Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp244530pxb; Fri, 3 Sep 2021 00:53:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3X83j7FoiVsZt4qKhi3j44R5k9/28blv6k0GybhNenE3m6odmN3YQZ1GgvKZdej8T59HD X-Received: by 2002:a05:6602:130c:: with SMTP id h12mr2086079iov.132.1630655600497; Fri, 03 Sep 2021 00:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630655600; cv=none; d=google.com; s=arc-20160816; b=NURRT93R7I7iAiVnsk0u/ThpGfuhiWLa6ZBoQNw3fKnoT4fqa5nLTvdjFWdSGtzkwC jBlqghEA9G7OzYRUxM7GpjU6qsoi7G39giUOb/0bBZksC9kHrN9LJEvdJE0Q/mYPM4dZ X1Z9wKLqbwjcIhMRZllmqFP+RJsdqep2WCvwd8VcZ8IJDW79uvr9EY6r/KCGZuxAyYxv 6ihiGyTa1GtYTohWnuzqxvvKvMq7I8riDjl4eERxaEASoxFqxL1+tCr10NdL3WrXraju BcAe63+ftxkUBZqHtTn0JXrI2Wqqmbi1pd6eylZdmFyi8aOaWFSbUrAN6PeXr1quc6HQ LccA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=388pKK/4/hgVzXpnSJLGPnhrispQ3ruh0T3Tg2Nd2bg=; b=HZR8PU6SZC2gzpOdObENE0t7+Qo6VVXWHL2osFxNFhYidQxwFJ5cd0vfJagMujOe47 IRtK+Kmncws2RW7H1SxKD8j72wWeJrR26WdcquvmPO1tnLpFFg4htKNsXxTMMh+Xm0kw 73RpNh05T2tQIL0tN/PUG38nDhacfq6qBHUV1YmYIjUgQ/7ml8Yvb8CdI87Oz00uAaB0 vd+TRRH+BmQYrDhwPhJY/yfei+s0EfQRUcgbumysxn/8hu2eQ7Ld6Mxv2shCNgZRPqPB u0GhNMfOZ0MsUJgixUYaPVgNEHFuWfKOt5iLvKTLxv/AJ3br7e/YxbEEO6NSj/3Qq+Eo EDgQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n45si4081982jac.76.2021.09.03.00.53.08; Fri, 03 Sep 2021 00:53:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346392AbhICHwu (ORCPT + 99 others); Fri, 3 Sep 2021 03:52:50 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:53746 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234758AbhICHws (ORCPT ); Fri, 3 Sep 2021 03:52:48 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R971e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Un56PY0_1630655505; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Un56PY0_1630655505) by smtp.aliyun-inc.com(127.0.0.1); Fri, 03 Sep 2021 15:51:46 +0800 From: Yang Li To: jdike@addtoit.com Cc: richard@nod.at, anton.ivanov@cambridgegreys.com, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] um: virt-pci: Fix the application of sizeof to pointer Date: Fri, 3 Sep 2021 15:51:08 +0800 Message-Id: <1630655468-71684-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sizeof() when applied to a pointer typed expression gives the size of the pointer. Clean up coccicheck warning: ./arch/um/drivers/virt-pci.c:192:20-26: ERROR: application of sizeof to pointer Reported-by: Abaci Robot Signed-off-by: Yang Li --- arch/um/drivers/virt-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c index c080666..156af2f 100644 --- a/arch/um/drivers/virt-pci.c +++ b/arch/um/drivers/virt-pci.c @@ -189,7 +189,7 @@ static unsigned long um_pci_cfgspace_read(void *priv, unsigned int offset, buf = get_cpu_var(um_pci_msg_bufs); data = buf->data; - memset(data, 0xff, sizeof(data)); + memset(data, 0xff, sizeof(*data)); switch (size) { case 1: -- 1.8.3.1