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: 9535447 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 4F7E36042D for ; Tue, 24 Jan 2017 15:42:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42561281A7 for ; Tue, 24 Jan 2017 15:42:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 370A2281C3; Tue, 24 Jan 2017 15:42:37 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EAB16281A7 for ; Tue, 24 Jan 2017 15:42:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75B4A6E806; Tue, 24 Jan 2017 15:42:36 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBEA16E806 for ; Tue, 24 Jan 2017 15:42:33 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.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: [Intel-gfx] [PATCH] ALSA: fix resource_size.cocci warnings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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;