Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp725608pxa; Wed, 12 Aug 2020 11:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZCAAK1vnLTHEOrfZPsCs10wpK8JLBBD2I755G78SdWv3Y83r+0rfVJ2ZNzOhX4F47MS2q X-Received: by 2002:a17:907:42a0:: with SMTP id ny24mr1236212ejb.328.1597258398004; Wed, 12 Aug 2020 11:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597258397; cv=none; d=google.com; s=arc-20160816; b=VXPUYL9OBJtOrgUw33WrBZXVbpyX1t16rjzhoGDdOHbo5XwvHBnpNVuxie8mTtnF0T PmQyFfHKwLP61KKwOeuk7aqU/Bj3/YKzMhVK9qUYWitfooTcptV6BxS5syvxqeMhkLTr RWSHS92ujd0OIDKqryp0Y6ErNz87fuSt2X3yCq/hvpNXOcTxUhWz4h2yzfqveRIgID04 cj8kIsCqv/AagFv4BsRBeOcWp9CQIkpxxuDUU+KtvyUlhA4bWi49MS3mDF4YlIR9dPH6 gkqb9fzCowUAqL3DIgnvWS8JGtq+CKucmMUlMXD0cp7pCk1TKNzlWK77HmeTExKCW7S7 GFfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=tzIBen6w4bUWMgI2Pf/yg1I6MSiF5J6drKXgCNK2HaY=; b=EeZwA38bCy54EnUZc96LLF52ks7XUfVfM1Raljwj21p5LuKfRvVGI8Hp/poqqdxuFS NqvvLzkAFW5VFEvM6yIaht0qdTKmSa+11/szHfyFWyyl/wfhj5DpJ2RHIbpvAMEG2SJl mLyiTBAkJWWSewDI5txwBmbrQpmaCrNPbDAOxP1nacp9vyfwSyGhOMQnzDAy0U0FiSM/ ktJDFBwJcKE2iHnh/NSkG3t3sb4K39w/PRe9DHsLrT8U8qidJxDzWIIpEweF/EndAhok kMvm2VHtNCwWKwwo4XeXmtLqMBTjyzQwpu0tC6xMou/URXWBn5PZqBadRwv+kSmuaY5g C9vg== 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 a12si1655473ejr.111.2020.08.12.11.52.54; Wed, 12 Aug 2020 11:53:17 -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 S1726578AbgHLSwL (ORCPT + 99 others); Wed, 12 Aug 2020 14:52:11 -0400 Received: from foss.arm.com ([217.140.110.172]:47608 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbgHLSwL (ORCPT ); Wed, 12 Aug 2020 14:52:11 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 87974D6E; Wed, 12 Aug 2020 11:52:10 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3646B3F22E; Wed, 12 Aug 2020 11:52:09 -0700 (PDT) References: <20200812125300.11889-7-valentin.schneider@arm.com> <20200812175958.GA94389@b1d876c4bf9f> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: kernel test robot Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kbuild-all@lists.01.org, mingo@kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, Quentin Perret Subject: Re: [PATCH] sched/debug: fix noderef.cocci warnings In-reply-to: <20200812175958.GA94389@b1d876c4bf9f> Date: Wed, 12 Aug 2020 19:52:07 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/08/20 18:59, kernel test robot wrote: > From: kernel test robot > > kernel/sched/debug.c:272:30-36: ERROR: application of sizeof to pointer > > sizeof when applied to a pointer typed expression gives the size of > the pointer > > Generated by: scripts/coccinelle/misc/noderef.cocci > > CC: Valentin Schneider > Signed-off-by: kernel test robot > --- > > url: https://github.com/0day-ci/linux/commits/Valentin-Schneider/sched-Instrument-sched-domain-flags/20200812-205638 > base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 949bcb8135a96a6923e676646bd29cbe69e8350f > > debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/kernel/sched/debug.c > +++ b/kernel/sched/debug.c > @@ -269,7 +269,7 @@ static int sd_ctl_doflags(struct ctl_tab > return 0; > } > > - tmp = kcalloc(data_size + 1, sizeof(tmp), GFP_KERNEL); > + tmp = kcalloc(data_size + 1, sizeof(*tmp), GFP_KERNEL); Praised be coccinelle for rubbing in my face that I can't write code; also I'm not even checking if the allocation succeeded which is clearly daft, even if this is debug stuff. I'll blame the heat and try to move on... > for_each_set_bit(idx, &flags, __SD_FLAG_CNT) { > char *name = sd_flag_debug[idx].name; >