From patchwork Tue Aug 7 12:26:42 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: 10558649 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 6B54B13AC for ; Tue, 7 Aug 2018 12:26:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59E1229C39 for ; Tue, 7 Aug 2018 12:26:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E6AB29C3E; Tue, 7 Aug 2018 12:26:48 +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 F212129C39 for ; Tue, 7 Aug 2018 12:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389071AbeHGOkw (ORCPT ); Tue, 7 Aug 2018 10:40:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47494 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389022AbeHGOkw (ORCPT ); Tue, 7 Aug 2018 10:40:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:References:In-Reply-To: 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:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rDGutmk3M+hlG7O5Uo0H0M8NjDyGBGHOts1bDE1+O6k=; b=tH129iGctAxNHfdVuUCfkUX9c c5h2gSLajpoiusqDoh5SZX2bW6sNA/ctz3fZTU44DaUmtdwUzkuNLKeR+k9LFFZLuGMpEofyCNKzA V99yOGnTuMYJxSVOuBQHSvXbytHr/acL7cmGqJkHH6ABTu2EPFP0fYH8pgtmlAJYX71JFGrq8Z3bz 7+fJLN+CNJIHNKvFuJCklL3B8J6qP4gVciVRzzBByU7wQ5akaKb7rx0t7RN965xCkha20gnDyY6LY Pc9pOgvwknLm9KAuuGtjh9+F/tIKReupIpPuH/EeiQ8LEYZYqa4tsRMBZYNP2fcHVNV+KImzqRh7W V7fnOEQZA==; 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-0005B9-KL; Tue, 07 Aug 2018 12:26:45 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1fn14V-0009ro-GM; Tue, 07 Aug 2018 08:26:43 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Michael Buesch Subject: [PATCH 3/3] media: xc4000: get rid of uneeded casts Date: Tue, 7 Aug 2018 08:26:42 -0400 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: <7fbc03c87b03ffb9128fe67bcbca6f1c6cc96c5c.1533644783.git.mchehab+samsung@kernel.org> References: <7fbc03c87b03ffb9128fe67bcbca6f1c6cc96c5c.1533644783.git.mchehab+samsung@kernel.org> In-Reply-To: <7fbc03c87b03ffb9128fe67bcbca6f1c6cc96c5c.1533644783.git.mchehab+samsung@kernel.org> References: <7fbc03c87b03ffb9128fe67bcbca6f1c6cc96c5c.1533644783.git.mchehab+samsung@kernel.org> 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 Instead of doing casts, use %zd to print sizes, in order to make smatch happier: drivers/media/tuners/xc4000.c:818 xc4000_fwupload() warn: argument 4 to %d specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/xc4000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/tuners/xc4000.c b/drivers/media/tuners/xc4000.c index 76b3f37f24a8..eb6d65dae748 100644 --- a/drivers/media/tuners/xc4000.c +++ b/drivers/media/tuners/xc4000.c @@ -815,9 +815,9 @@ static int xc4000_fwupload(struct dvb_frontend *fe) p += sizeof(size); if (!size || size > endp - p) { - printk(KERN_ERR "Firmware type (%x), id %llx is corrupted (size=%d, expected %d)\n", + printk(KERN_ERR "Firmware type (%x), id %llx is corrupted (size=%zd, expected %d)\n", type, (unsigned long long)id, - (unsigned)(endp - p), size); + endp - p, size); goto corrupt; }