From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44B2537AA7B for ; Mon, 2 Feb 2026 15:24:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770045873; cv=none; b=L84w3CcplazkLTX105/LK2WUbR3wE7vSAmvaRlPDLPiwlZKLPuoVjPib9lb5spRQFuP0nTi3FQO94WYwZ+pxpN5FGibfcT1OlF/3BQNbHUzcFIHT7N86lkscbxmSLbxZMJ+hbauH3Ben932fZF2ZneKk+oWUm9k++gjpkH0vWoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770045873; c=relaxed/simple; bh=UW9EMfULz9lp2I2TLd+9UqT7rS46jrUoMP1ZTq/M2yE=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=QZzaooBOrV5UIh3MJm6Rh2jeONNt1atMnRB/Z6fUAXDX8pqHHvhDSHkeX4d+tLC3J6yGOnkiKXuFVlHOzYVBgKFERpHCKPTs7eMiuEA3/UB4uQb4PcbpLPj1nyAFCxq1mMTZ2ofTh4mUkaUsOck0sizG22uxCIcKMW8Hs60Xdmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com; spf=pass smtp.mailfrom=perches.com; arc=none smtp.client-ip=216.40.44.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perches.com Received: from omf17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4CD121401EB; Mon, 2 Feb 2026 15:24:24 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA id 3868518; Mon, 2 Feb 2026 15:24:22 +0000 (UTC) Message-ID: Subject: Re: Checkpatch false positive: externs should be avoided in .c files From: Joe Perches To: Nam Cao , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org Date: Mon, 02 Feb 2026 07:24:21 -0800 In-Reply-To: <875x8fz6yz.fsf@yellow.woof> References: <875x8fz6yz.fsf@yellow.woof> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Stat-Signature: 3xw1qb3bwj6wgrkt5nkfk1gjd4atkqhg X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: 3868518 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+t2yIrv8FQyToqxNcrnh7Z9ngppvEUIBU= X-HE-Tag: 1770045862-379016 X-HE-Meta: U2FsdGVkX18cwVQjyfuMZG42z03aTTOjvRmrxLBPYR5wab+EcX/hgVK40UvhgLbxlPwE5WozeXvHUcXMJojOTu/5x7YpLMEKUf2p9kWzVNVW8ZEAdf7BFD3XH/blqTDY9RQKihbRRdmnT0cSWDgN2dqZcXFMFSOwe7bhyIQ8tkzg79fYAa4U6Mag8y6MmGoObC3SGK384GJt7nYXjhwF75OAGiBLH2n4bJgP0Wugui4T/mIyRd4grxPAdQmCvvkjQQTfVTgkJqDNjjCYHLwj0N1+5VzTLq1QVkgj1vsjDLJkcRVI8y23DhZ8py6kRR3t8OqPfi6+h7PodlYwaSwx5Nz0jA5Hb9FA On Mon, 2026-02-02 at 13:05 +0100, Nam Cao wrote: > Hi, Hi Nam. I was very confused for a second. I have a friend with your name. He's not someone who would use checkpatch. I'll look at it. cheers, Joe > checkpatch seems to give a wrong warning about this patch: > https://lore.kernel.org/linux-riscv/20260202115403.2119218-1-namcao@linut= ronix.de/T/#u >=20 > WARNING: externs should be avoided in .c files > #663: FILE: arch/riscv/kernel/setup.c:49: > +atomic_t hart_lottery __section(".sdata"); >=20 > I think this is wrong, because 'extern' does not even appear anywhere in > that part of the diff. >=20 > I attempted to look into checkpatch, but my perl knowledge is not > sufficient to dig deeper into this issue. Can you please have a look? >=20 > Best regards, > Nam