Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3695786ybz; Mon, 20 Apr 2020 07:50:28 -0700 (PDT) X-Google-Smtp-Source: APiQypJp2b8qoFy8WGcXzPvSuxpLi6C4FpvTlrhKfAkRcMexwb21xpwKcLQV6by/z4TZj0e5sDXu X-Received: by 2002:a17:906:edb5:: with SMTP id sa21mr16838312ejb.270.1587394228516; Mon, 20 Apr 2020 07:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587394228; cv=none; d=google.com; s=arc-20160816; b=oDMCja0RA/ySVpWa5znEAbelMKaljezZCot0d94kmSe7Oi/PJ4cgxoOXa1whLTas7t UoJ08akSI5xBRgs+Eq/MRuWfuVOiGWvqpE2e7hA1CXiMMX7RxXoMsESFoOSUnTqZiUmD 3yIpogwXoys6MVngBHIbBGBEBt//GISdh6ONGYXCfjuECCkRfPnXAMqDjYnEqUdzx5GW dPCzjArvZPfdtbQYXzHO/LxkCjW2r5JbxIXX0qmPjCKJgu8evoe94aZq5Zm9bcndFm4T YSyb+GcF5uQxSbIXONBcrv84Xd8yhR6Kkl0qNwb9Wj+7Eh26SiNt4yX6Cr3GVmQyGuAQ uG2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ck3m++VoFcCSZmzu2fJEQZkc+qdilzXj9OdZ7aAEysg=; b=yw+bDsfGH9oWCUjAMTKlpzmwYRBpqCRn7q2l0X5GBSpL01l4RV/O75Ur7NdedL1rKq v4bqX2746UTG+AXb8EZTEpQ0rPym0L/zgHLRFqixlp2EMkdZvQp6AtPeVtrpxmnpglT2 zHr5w+f/Pgi3WsCtBymtsS+NKa4Ap0QAtz0imRGkrZsy42YCMU8R1+vgwPksb1MsBgW2 /RzN1q9sLsmqtW/cnCLHz30hixB+AoKjePk1qy9cKnIFYREguQdUVftCdfEaqMt7DSY3 pxWHBGvCGAjNMndWo7ZP4qj/qpMqORnmz2y0dLnSD8qiLvdm42Du9v50VjO58Po5HIGd YTKg== 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 g26si652065ejr.99.2020.04.20.07.50.05; Mon, 20 Apr 2020 07:50:28 -0700 (PDT) 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 S1728292AbgDTNit (ORCPT + 99 others); Mon, 20 Apr 2020 09:38:49 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55452 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726798AbgDTNit (ORCPT ); Mon, 20 Apr 2020 09:38:49 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D9D35C83490D24E12002; Mon, 20 Apr 2020 21:34:56 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Apr 2020 21:34:49 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan Subject: [PATCH v3] staging: mt7621-pinctrl: Use correct pointer type argument for sizeof Date: Mon, 20 Apr 2020 21:34:16 +0800 Message-ID: <20200420133416.3087-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:223:14-36: WARNING: Use correct pointer type argument for sizeof Signed-off-by: Jason Yan --- v2->v3: Add this description of v1->v2. v1->v2: Use sizeof(*p->func) instead of sizeof(struct rt2880_pmx_func *) suggested by Dan Carpenter. drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index d0f06790d38f..caaf9e34f1ee 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c @@ -220,7 +220,7 @@ static int rt2880_pinmux_index(struct rt2880_priv *p) /* allocate our function and group mapping index buffers */ f = p->func = devm_kcalloc(p->dev, p->func_count, - sizeof(struct rt2880_pmx_func), + sizeof(*p->func), GFP_KERNEL); gpio_func.groups = devm_kcalloc(p->dev, p->group_count, sizeof(int), GFP_KERNEL); -- 2.21.1