From patchwork Tue Jul 24 09:34:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 142743 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp7049800ljj; Tue, 24 Jul 2018 02:34:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeTCAfTZz6CaVItSUYXsOFyZxCrv3Jlol0Mo0+moamvpoPDuLolY/bf+oa3B6M59lJ28e7f X-Received: by 2002:a17:902:bf44:: with SMTP id u4-v6mr16482067pls.84.1532424882814; Tue, 24 Jul 2018 02:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532424882; cv=none; d=google.com; s=arc-20160816; b=irFJlH4SrENGS88X89kR8nlFMCqJusFZx0+iWYNuT0fcJnLoW8RvOQiV8ComCCG+IV VaACxNELIMTfVSMwFzQrc85meNeHaxu3mtvtBwstx//aBkQ2la7ZIyRVTzLxmSNSgSWm KeGhDyUIIsaNb3srU2mfUN/VF1S5bXLb4J5eSZ+6s5pHGRZNjikMMhX0AmqkVQlPscuH 53WmWIQf5P0FUNB/BIlr42bIt69+WPiIU8dY8GVv8n2wZMM0ZLdlOasnfugcU013XnDm xlahhjMRbvqc9bWxOg0uLXGZEytpubpdg2KjfX8z2cXn2Y8de7J6sRPZ7cHKrnZAyzWb XlAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=G3xIEVK2aWSwZgw9YEOXroX0+SL7+ksMKkq0cZdYEuI=; b=f2RgawVrS1cvID6MYoJy612cXIcojabrL02PYvnbTZSOE2b/6xAC5dEt3M2C+2Gsua Zz2DeZK8TdZGQrsZn9QMm9Gn14djkeJ1lQjpT0RWDbvtqFpgpPlx9gGUOxuPWjJjl8uk EusPxIiOy7oY9pMCddFKVpF9FmrWRKxDs7spz7rSkVwOSL/9dxXDtn/74YTwpnIXZT5c TzS0SveywxnuY84uJuDVuZduaY8lKcoFMq9w78mTzYE/9OQNn/7wbk97v5+Lye+oE0n3 RX1GOcNxdCo+KLy8x2g3eHrfXNbIHy9J0hQKewAHmbszSVSQ6DOg3HFq7wtZBwmjzAgH qgtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24-v6si10395426pgo.295.2018.07.24.02.34.42; Tue, 24 Jul 2018 02:34:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388409AbeGXKkO (ORCPT + 31 others); Tue, 24 Jul 2018 06:40:14 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:46815 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388236AbeGXKkO (ORCPT ); Tue, 24 Jul 2018 06:40:14 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M2v1a-1fxdsb0Dhe-00sdHZ; Tue, 24 Jul 2018 11:34:35 +0200 From: Arnd Bergmann To: Benjamin Herrenschmidt Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] fsi: master-ast-cf: use correct format string for size_t Date: Tue, 24 Jul 2018 11:34:16 +0200 Message-Id: <20180724093433.1623525-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:zLOTnETzJvCqIvVnyvBFNfJmu6irgFTX1fB7iM/ucDjU4/oDZdl EBY0g7WtK/QKdhCt+DOUHPSZoMnVzI7d7hRnzRz92XjASnAy6BmYJT+X9cQNTk4yWf31UZW d3Bnl4AGl0iQ+frL18AaxJpCyACLuwM/5cS3Q2ugSUJpQ3lSndfU7LSTIxTElHbFKmwoTBt CfVtmHkpXv2HWJRedIz3g== X-UI-Out-Filterresults: notjunk:1; V01:K0:aGGtW58ZOSM=:tnTVArzJci4gaKlVdO9jtP vhKVP22gReGj+tP2/W+6kTk1PkwG3o90mA2Nt7eSVthrOw7zCxunMiEcWyAMsApCvGuXzsuW0 7ogBvfyGMjhox6MiIvD6q9vGk+ywPO9ubhITNhvsjYxRDDBFu5MgOXiC0XeUA0QHZPl3JrenE 9QOEiqY3KNiq6jis3D/1nBHR2s/Z26jbcoaB0GGxookwDPh7oEiSr6RXYxmGyG5gGAfxp5zTH eUrsxadSIo8fWLSbAxvLyKZudnrahKmpQmwWzyKDy+wLusRCIYsnzKYcZZmEIosraI4QErN/B tLAlTXlbvynNEk6rfyUjYkQ/fMDH9DSTcF9MstVTEkXhzq0dravlOPGDlQnWM9Y+ofgMjsGqM 9xkuir/j5khVdCek9fNLFJ/hN3uCWxdms+Z3++ykiHBtuAA4cfhxjsZY3oR/HMlLtfx9RU9kD z+PmPtSCph3XSjyU5QhX4tjdd8x37Lgt7KKxl9e8W6aiyE4bEbGSUr5yZNF6QqLEWeRh57nbv mKG5jTABt5PNowU/A+x+dQnUJYedSxWfJU8nU+n716WrcSOyka+ESqF5IpnMSg5mqy0RWHC4Q QfkQX7/VTRAlc8pBk1CfOFD1+KBs3IIgukoNc7fsY7vJMhTkEbj7e/VEkn5KKhs/YVR+jGn2p Kq0ybTAdb9E+0nbC4QIwhvhXOGfgSeZvFw5dztE8gLr9ZaD2caVScVYWBffHaPf+Bhq4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 32-bit targets, size_t is often 'unsigned int', so printing it as %lu causes a warning: drivers/fsi/fsi-master-ast-cf.c: In function 'fsi_master_acf_read': drivers/fsi/fsi-master-ast-cf.c:609:23: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=] dev_dbg(master->dev, "read id %d addr %x size %ud\n", id, addr, size); drivers/fsi/fsi-master-ast-cf.c: In function 'fsi_master_acf_write': drivers/fsi/fsi-master-ast-cf.c:634:23: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=] The correct format string is %zu. Fixes: 6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire") Signed-off-by: Arnd Bergmann --- drivers/fsi/fsi-master-ast-cf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.18.0 diff --git a/drivers/fsi/fsi-master-ast-cf.c b/drivers/fsi/fsi-master-ast-cf.c index 57afaae0b691..d1bbdf8b8343 100644 --- a/drivers/fsi/fsi-master-ast-cf.c +++ b/drivers/fsi/fsi-master-ast-cf.c @@ -606,7 +606,7 @@ static int fsi_master_acf_read(struct fsi_master *_master, int link, return -ENODEV; mutex_lock(&master->lock); - dev_dbg(master->dev, "read id %d addr %x size %ud\n", id, addr, size); + dev_dbg(master->dev, "read id %d addr %x size %zu\n", id, addr, size); build_ar_command(master, &cmd, id, addr, size, NULL); rc = fsi_master_acf_xfer(master, id, &cmd, size, val); last_address_update(master, id, rc == 0, addr); @@ -631,7 +631,7 @@ static int fsi_master_acf_write(struct fsi_master *_master, int link, mutex_lock(&master->lock); build_ar_command(master, &cmd, id, addr, size, val); - dev_dbg(master->dev, "write id %d addr %x size %ud raw_data: %08x\n", + dev_dbg(master->dev, "write id %d addr %x size %zu raw_data: %08x\n", id, addr, size, *(uint32_t *)val); rc = fsi_master_acf_xfer(master, id, &cmd, 0, NULL); last_address_update(master, id, rc == 0, addr);