From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63C38CFA769 for ; Fri, 4 Oct 2024 11:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nEn5JhXvvfTVtyJrQ7khN8e0G0kMnthQARwoaUjxOUw=; b=Lt4jRNvDAB+uHCQKXVUTzSOWEX 6Unk1OHKmvUo2XdLYZ3Y17TL7irifmv5Ny7xt6VZKeukfVmy8EPcnFBJ8kJP2gkMZPbZlAeai8MAH WYMVcgzjWpwBES7xqLwpvfpHp17Qy0sazOeVe280bfEYEFWrUXFqz/FCG+ulQktZdjVSHnJGvMdEE y56BuwsJDQJpn7SRfewkV49Z4vTfL4pscDS0/9mvqnlYjBS6xoBHMnvyAVidrT1Mma63HK9o4g3Be xFs6btP+oZefrtOmrWQUxkX9UE5hJfcJ905H0UpKuXAWOIO3U+Zi3Cleb6myIineZl31XZVXFDRN/ V+4CuTyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swg9Q-0000000C0tF-1Zj7; Fri, 04 Oct 2024 11:07:12 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swfpA-0000000Bw9J-2tYy for linux-arm-kernel@lists.infradead.org; Fri, 04 Oct 2024 10:46:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D4F2A5C5AC3; Fri, 4 Oct 2024 10:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBF27C4CEC6; Fri, 4 Oct 2024 10:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728038775; bh=B8ZfT9sDJWNA2ZZ/GjSMk3QDZWUnW9h5HxHc1sUE5Io=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jGPiIn2UFQvTCg0slQtAATcMv+919vOElr0Rv/jVtg/0wKz8bH4204JEOMsanC8d1 FIujERpd+huQqfUlCfxmKN7qdmR/Ta7y6zxyeuXku7UaOdA75Ex2XRABocrVv/A1/G LiCZ4qEYQrn14YXrPdtIDSjmBLQM8LJdAmTMY6NIrh5PNJMOVNYYA/qOV8SFd3F0G9 KKXiwybcqo5KlenddfLe9drdVFRmP3Iay7TyPbgMdEJnhEBgIK9dMsNRd9UQiHFaU6 QhKP1ckugsiRZau26IdctAq4VpDLPw3gtzBC3k+zpOUCxgk4KZ+ton+ePkzpqyMgXb NjY+wNrYBkZdw== Date: Fri, 4 Oct 2024 11:46:10 +0100 From: Simon Horman To: MD Danish Anwar Cc: Jakub Kicinski , robh@kernel.org, jan.kiszka@siemens.com, dan.carpenter@linaro.org, diogo.ivo@siemens.com, andrew@lunn.ch, pabeni@redhat.com, edumazet@google.com, davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srk@ti.com, Vignesh Raghavendra , Roger Quadros Subject: Re: [PATCH net] net: ti: icssg-prueth: Fix race condition for VLAN table access Message-ID: <20241004104610.GD1310185@kernel.org> References: <20241003105940.533921-1-danishanwar@ti.com> <20241003174142.384e51ad@kernel.org> <4f1f0d20-6411-49c8-9891-f7843a504e9c@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4f1f0d20-6411-49c8-9891-f7843a504e9c@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241004_034616_797829_0BEB743F X-CRM114-Status: GOOD ( 22.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 04, 2024 at 10:25:05AM +0530, MD Danish Anwar wrote: > > > On 04/10/24 6:11 am, Jakub Kicinski wrote: > > On Thu, 3 Oct 2024 16:29:40 +0530 MD Danish Anwar wrote: > >> diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.h b/drivers/net/ethernet/ti/icssg/icssg_prueth.h > >> index bba6da2e6bd8..9a33e9ed2976 100644 > >> --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.h > >> +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.h > >> @@ -296,6 +296,7 @@ struct prueth { > >> bool is_switchmode_supported; > >> unsigned char switch_id[MAX_PHYS_ITEM_ID_LEN]; > >> int default_vlan; > >> + spinlock_t vtbl_lock; /* Lock for vtbl in shared memory */ > > > > This needs to be kdoc, otherwise: > > > > drivers/net/ethernet/ti/icssg/icssg_prueth.h:301: warning: Function parameter or struct member 'vtbl_lock' not described in 'prueth' > > Hi Jakub, > > Removing the documentation from here and keeping it in kdoc results in > below checkpatch, > > CHECK: spinlock_t definition without comment > #69: FILE: drivers/net/ethernet/ti/icssg/icssg_prueth.h:300: > + spinlock_t vtbl_lock; > > > What should be done here? Should I, > > 1. Move the documentation to kdoc - This is will result in checkpatch > 2. Keep the documentation in kdoc as well as inline - This will result > in no warnings but duplicate documentation which I don't think is good. > > I was not sure which one takes more precedence check patch or kdoc, thus > put it inline thinking fixing checkpatch might have more weightage. > > Let me know what should be done here. FWIIW, my preference would be for option 2. I think it is important that Kernel doc is accurate, as it can end up incorporated in documentation. And moreover, what is the point if it is missing bits? I feel less strongly about the checkpatch bit, but it does seem to be worthwhile following that practice too. Maybe you can avoid duplication by making the two location document different aspects of the field. Or maybe that is silly 🤷