From patchwork Tue Aug 7 12:26:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10558645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7496B13AC for ; Tue, 7 Aug 2018 12:26:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6329329C3D for ; Tue, 7 Aug 2018 12:26:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5712929C3E; Tue, 7 Aug 2018 12:26:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01DF729C39 for ; Tue, 7 Aug 2018 12:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389010AbeHGOkv (ORCPT ); Tue, 7 Aug 2018 10:40:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47486 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388940AbeHGOkv (ORCPT ); Tue, 7 Aug 2018 10:40:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Message-Id:Date:Subject:Cc:To: From:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ibc4/eB5kuwDODCXtUvYLb56VJsdK2LyJcg4s/7AY1A=; b=eUz348BOIZvYSsefPxWMq/upss fRQYVD98WWaUx2MNoe02UcwsidEQwRD5wszNuI0nbaHs602xJjj2wBfrxqkPUWqOlrdu13dZ+aUeq PaloXyZCxA6NBosSd4Xw8nMlbfApoQhT+cHrNpWHWBnZmC441UKK94k5iiqDycuSJ5goYlgAXm8xw GMVZ8p/GLFAkbmmmSjahzNmp/Z17Up8STMWBJCDrz3C5aOcyK3YVHvC1yn7bQTmhzPYtFaZceFpA8 rpUhICzbOcyb0TFBNlJ4StXmy/y3Pn6CRMEaJ5BnnQktLAxS4cNNeKniQuYJLogSzKY+G/s7RwP6h vou3VNNw==; Received: from [179.177.31.111] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fn14X-0005B7-H1; Tue, 07 Aug 2018 12:26:45 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1fn14V-0009rg-Ex; Tue, 07 Aug 2018 08:26:43 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 1/3] media: tuner-xc2028: don't use casts for printing sizes Date: Tue, 7 Aug 2018 08:26:40 -0400 Message-Id: <7fbc03c87b03ffb9128fe67bcbca6f1c6cc96c5c.1533644783.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.17.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Makes smatch happier by using %zd instead of casting sizes: drivers/media/tuners/tuner-xc2028.c:378 load_all_firmwares() warn: argument 4 to %d specifier is cast from pointer drivers/media/tuners/tuner-xc2028.c:619 load_firmware() warn: argument 6 to %d specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/tuner-xc2028.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/media/tuners/tuner-xc2028.c b/drivers/media/tuners/tuner-xc2028.c index 222b93ef31c0..aa6861dcd3fd 100644 --- a/drivers/media/tuners/tuner-xc2028.c +++ b/drivers/media/tuners/tuner-xc2028.c @@ -376,9 +376,8 @@ static int load_all_firmwares(struct dvb_frontend *fe, tuner_err("Firmware type "); dump_firm_type(type); printk(KERN_CONT - "(%x), id %llx is corrupted (size=%d, expected %d)\n", - type, (unsigned long long)id, - (unsigned)(endp - p), size); + "(%x), id %llx is corrupted (size=%zd, expected %d)\n", + type, (unsigned long long)id, (endp - p), size); goto corrupt; } @@ -616,8 +615,8 @@ static int load_firmware(struct dvb_frontend *fe, unsigned int type, } if ((size + p > endp)) { - tuner_err("missing bytes: need %d, have %d\n", - size, (int)(endp - p)); + tuner_err("missing bytes: need %d, have %zd\n", + size, (endp - p)); return -EINVAL; }