From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 9213135BDB8 for ; Mon, 2 Feb 2026 12:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770033927; cv=none; b=V5krKrcgfM8SOofBKPvXWGht3m2ldnMj1ObtvFPtIVZH4puffdZ5a2i7MgSfqwwSeI4+rGCvp0LyxzTFOJ0Pxr85br/Pb8ELvN8ozuGd0wgi4EeOd7JK+8eqc9jG+Yemiik425aqUkSFXmoM4jI3XM7XuacCi3Yx0l1V9eL6R1g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770033927; c=relaxed/simple; bh=Q25zsIgkg5h1Qt0Fu7NnJsjVN5Xsm9u1AYDDSh+UKmg=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nGjx9TRTYqY7yUMVf0R8Qu6VACyHncCm7aDgoOcf5/+4S/EIaICReap3QnyBS15pm3wqLPiBNEPcKzh7cCvfVMdo8hrp4DW51vBB/xY90Ds+1BihvUKoXSRSQcVUfGkDY/glPWtBYBB6nW17jXFMAhodboT2dHNLrB8wBxDiLLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4JCtA5Wz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZnPqOb0M; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4JCtA5Wz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZnPqOb0M" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1770033925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Q25zsIgkg5h1Qt0Fu7NnJsjVN5Xsm9u1AYDDSh+UKmg=; b=4JCtA5WzU8nzSY45CBdpmBolIFeXQAQfmzcthhLmumWD0upSRtmOX/Mangs6tgAsAng5MD AprhgpXyu8Ggkk/8lnt7PynePIT8F/CCH8yjo/imIu8RE7CvkVL1EHnAcFt3pYR5FyD/58 I9JOpLqv3u6c8wGPOGjtJtHLAu5lo7QGJSs89mAlKQIPb+t2bBZ4uaLo7Md7yIcu7ON7uC +ZtiA5SBETeapYF2vsx9aTZTDEPHRH9bpha11FIoCdKENBYhvpIhZ3OLp3QwLH4ELp6PPi tex9QHkq5/GjcXzT3ER57YXk1pE7XzJ2uwb3EZPcMdSWXSPiu5IruS1kPgeYSg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1770033925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Q25zsIgkg5h1Qt0Fu7NnJsjVN5Xsm9u1AYDDSh+UKmg=; b=ZnPqOb0MgUpmeWCXuFO8mJzd2P6NS5WuDrYYrnNwbxiBjfhpXxvm68Elwtmenh7XgB724l xb3aCKN/jZTee9Cw== To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org Subject: Checkpatch false positive: externs should be avoided in .c files Date: Mon, 02 Feb 2026 13:05:08 +0100 Message-ID: <875x8fz6yz.fsf@yellow.woof> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi, checkpatch seems to give a wrong warning about this patch: https://lore.kernel.org/linux-riscv/20260202115403.2119218-1-namcao@linutronix.de/T/#u WARNING: externs should be avoided in .c files #663: FILE: arch/riscv/kernel/setup.c:49: +atomic_t hart_lottery __section(".sdata"); I think this is wrong, because 'extern' does not even appear anywhere in that part of the diff. 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? Best regards, Nam