From patchwork Thu Aug 3 14:35:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 9879269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97FFF60360 for ; Thu, 3 Aug 2017 14:36:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8934C288CF for ; Thu, 3 Aug 2017 14:36:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D9F728926; Thu, 3 Aug 2017 14:36:40 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F26D528920 for ; Thu, 3 Aug 2017 14:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gccF3Gymysh+LJp6NOaCtcVBZWzWxFQoHT7z0yLPYzo=; b=QwJPqhpC4mFpFg mjwLS5XwoJGPI3CD7sVzchg4O82aKb9vZzJ06yv3Hb8JyM2ZCrDhnXncPdFf0Dpch3CUUZdFMChJR E5WJHIxIoASeR1bYmE7LGoOKKGuNfxvDxyJHrjY+2BTnvKcR+KO4ghHNin0XjOunTzBXgPM3bXx76 ecj87OXYUJ76bGAvg9z7ScJDL1q3JEz3TOkYg8bwgDHeFvzLb9SBWwOeeXlVitp8qMv8IMLzhEyad OE90T/7UjPGvlTwXXNaqLgUJqxVTb+6uxRx+NbIILO0IaebW/43ohru30jHEtmTcSS1PM950I7Uei VVoU3gJkv4yn39b14Zjg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ddHEr-0003Rc-AQ; Thu, 03 Aug 2017 14:36:37 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddHEo-0003PG-4Y for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2017 14:36:35 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Aug 2017 07:36:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,316,1498546800"; d="scan'208";a="119224607" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga002.jf.intel.com with ESMTP; 03 Aug 2017 07:36:10 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1ddHIf-000Qbc-V5; Thu, 03 Aug 2017 22:40:33 +0800 Date: Thu, 3 Aug 2017 22:35:44 +0800 From: kbuild test robot To: Oleksandr Shamray Subject: [PATCH] drivers: jtag: fix resource_size.cocci warnings Message-ID: <20170803143544.GA34229@lkp-ib03.lkp.intel.com> References: <201708032250.cmVljGeY%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1501679918-20486-3-git-send-email-oleksandrs@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170803_073634_277092_CBEA432D X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jiri@resnulli.us, arnd@arndb.de, system-sw-low-level@mellanox.com, gregkh@linuxfoundation.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, mec@shout.net, Jiri Pirko , kbuild-all@01.org, linux-serial@vger.kernel.org, vadimp@maellanox.com, Oleksandr Shamray , tklauser@distanz.ch, linux-arm-kernel@lists.infradead.org, joel@jms.id.au Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/jtag/jtag-aspeed.c:724:37-40: ERROR: Missing resource_size with res Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Fixes: acf0c42bb646 ("drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master driver") CC: Oleksandr Shamray Signed-off-by: Fengguang Wu Acked-by: Oleksandr Shamray --- jtag-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/jtag/jtag-aspeed.c +++ b/drivers/jtag/jtag-aspeed.c @@ -721,7 +721,7 @@ int aspeed_jtag_init(struct platform_dev return 0; out_region: - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); return err; }