From patchwork Tue Jan 24 15:41:46 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: 9535885 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 6AE5B6046A for ; Tue, 24 Jan 2017 21:01:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DD0126E76 for ; Tue, 24 Jan 2017 21:01:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52BEA26E78; Tue, 24 Jan 2017 21:01:15 +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, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD21926E76 for ; Tue, 24 Jan 2017 21:01:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 37DB72674EC; Tue, 24 Jan 2017 22:01:13 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B076D266C5B; Tue, 24 Jan 2017 21:58:54 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A0234266D1B; Tue, 24 Jan 2017 16:42:39 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id 5F58F266D1B for ; Tue, 24 Jan 2017 16:42:34 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP; 24 Jan 2017 07:42:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,278,1477983600"; d="scan'208";a="56671835" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga005.jf.intel.com with ESMTP; 24 Jan 2017 07:42:32 -0800 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1cW3H8-000FBb-5c; Tue, 24 Jan 2017 23:44:50 +0800 Date: Tue, 24 Jan 2017 23:41:46 +0800 From: kbuild test robot To: Jerome Anand Message-ID: <20170124154146.GA7724@lkp-ivb-ep02.lkp.intel.com> References: <201701242304.nWL6PHfB%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170124225753.9045-4-jerome.anand@intel.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 Cc: alsa-devel@alsa-project.org, tiwai@suse.de, intel-gfx@lists.freedesktop.org, broonie@kernel.org, rakesh.a.ughreja@intel.com, kbuild-all@01.org Subject: [alsa-devel] [PATCH] ALSA: fix resource_size.cocci warnings X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP sound/x86/intel_hdmi_lpe_audio.c:498:24-27: ERROR: Missing resource_size with res_mmio Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci CC: Jerome Anand Signed-off-by: Fengguang Wu --- intel_hdmi_lpe_audio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/sound/x86/intel_hdmi_lpe_audio.c +++ b/sound/x86/intel_hdmi_lpe_audio.c @@ -495,8 +495,7 @@ static int hdmi_lpe_audio_probe(struct p (unsigned int)res_mmio->end); mmio_start = ioremap_nocache(res_mmio->start, - (size_t)((res_mmio->end - res_mmio->start) - + 1)); + (size_t)(resource_size(res_mmio))); if (!mmio_start) { dev_err(&hlpe_pdev->dev, "Could not get ioremap\n"); return -EACCES;