Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp635141pxu; Sun, 22 Nov 2020 23:05:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdnWUKCD9ZVnC+6yoQhyo60b2t9jEjaWOHm5cllV/pgeZadegR1NguUIBFkC1PqzZq/aQM X-Received: by 2002:a17:906:4e4b:: with SMTP id g11mr22642377ejw.244.1606115140445; Sun, 22 Nov 2020 23:05:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606115140; cv=none; d=google.com; s=arc-20160816; b=MBYHvdV4JW1Qv1FaNPc7lWvKW0ynw7Wwe7veZa7QrzPsK6FtwegEUkGoJkD2x3AvJ7 W0LIVIXXm5ew9FiyTb3wC+GFWIH5fNeReNZsLIgnMTxRQZcqPBpx/A4M1tjxB4Z22Lcm G014rxwX4iODx02vcmewizezLd/Y3vDju4oz7E6LueOHf09r+VyqTN5qDP81V1r0KrKY gG6x0CzO9xW+Z/3yYBiEepuLfV9yxtaedA77dIrd/WjQ4DX0p6RDpoMQYcGks1RHgKUq BWA4AYcCu9cuBNWAqAfDPtu6KCJ304Dx7Nt/fyuF4UPabAweslOuH4LnmWSt6OSP+wh9 UpsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=Tp2bATWued0YXRULGWAe0k+QmNQX/jdp6ESB1TUwqes=; b=EJZgVs1AfXgfcCNEAAfughESly3ik9wnhCgQ9A9SZ2LJFA1MvZODwpRGmB5pMR0uSr WFiyBJA0/9UOxKWlAxvqzSTGsfYK1PoIU7Ut6sZQHiATJaST26gDvQaFDV/wvZjwfZXm aWdzuGfLWrco2BSQ2AyYtrTHueRZTbY/LPRz4J+HxeszO8UbPa8Uu6BILIpNTO0aA7I6 14KkxFRwoS3pVN5Rozc2+gxRaK0UIhR0P7ZOcRact/7mkG5mCOqZYMVzli/las2UovAL TeR4XCHN4IOVAtQI1meZ7/iNixeFLrQ3iMqMW9FwIKNQPpNUQKokrZw/KQKLBxkhPszD YJ1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g31si6356554ede.96.2020.11.22.23.05.16; Sun, 22 Nov 2020 23:05:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728069AbgKWHCi (ORCPT + 99 others); Mon, 23 Nov 2020 02:02:38 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:7965 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727352AbgKWHCh (ORCPT ); Mon, 23 Nov 2020 02:02:37 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CfdPn3tPkzhgHy; Mon, 23 Nov 2020 15:02:21 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 23 Nov 2020 15:02:32 +0800 From: Tian Tao To: , , , Subject: [PATCH] spi: dw: fixed missing resource_size Date: Mon, 23 Nov 2020 15:02:55 +0800 Message-ID: <1606114975-31362-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixed the coccicheck: drivers/spi/spi-dw-bt1.c:220:27-30: ERROR: Missing resource_size with mem. Signed-off-by: Tian Tao --- drivers/spi/spi-dw-bt1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c index f382dfad..da4f4d8 100644 --- a/drivers/spi/spi-dw-bt1.c +++ b/drivers/spi/spi-dw-bt1.c @@ -217,7 +217,7 @@ static int dw_spi_bt1_sys_init(struct platform_device *pdev, if (mem) { dwsbt1->map = devm_ioremap_resource(&pdev->dev, mem); if (!IS_ERR(dwsbt1->map)) { - dwsbt1->map_len = (mem->end - mem->start + 1); + dwsbt1->map_len = resource_size(mem); dws->mem_ops.dirmap_create = dw_spi_bt1_dirmap_create; dws->mem_ops.dirmap_read = dw_spi_bt1_dirmap_read; } else { -- 2.7.4