Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1681773pxj; Fri, 4 Jun 2021 23:31:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJKTHy9QzdRKd/fhS4EYIzP6tWZOpJPbROtBbBVDIAMpF/bZXPzgxr94JY2rugtUCoeZdN X-Received: by 2002:a05:6402:1ac9:: with SMTP id ba9mr8846809edb.250.1622874676567; Fri, 04 Jun 2021 23:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622874676; cv=none; d=google.com; s=arc-20160816; b=PwhItkls16exKqhZoxM1ZqJXXtCFoEzjlYpIVmMHQCeTgFt21Gu02CKocQAuf1Rvzv 9cZANkf+YlaTFb6hJYqAY2QcOuz0VW706wa3yEy09aDV9SYDpH7/bN1a7fi8VSbWsXn2 scSRf6DcraIwACkPCL0a+P0vrP2l9RcsvJs7ogiiF8tJ7fUpJjGucY1hMT8/uzhKB8wq k9c3Rj8qUMepsBRNkt8LDunsY/KB0N69R3XGbtvp1rFfy+KxTlpIXEniq71ddiuOXc+9 2pVWCUe3RYyrDH8EAyoHSmVVrHbjCA5JY9NShZdjwbr4bX4dahHZUL0iUw5QJ/GGGqTA 8iyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=B9JyDVIws8uLxUQvKC9g1t6jNeDQiifvl5QIAomMQs8=; b=R+BPxpMrwX9PSFts7d7zXefK7ykxRRHNmCVtY0MPpfzAn6yO/69dyq9DUXSHUhqPjr wfoWuZNsNrsr0ovzjlzt7JzQx/IalxJ80o1S8W/1vXBeVX/BK8QioOtByabsmI6bpovO w2XyL8DzsutNxdQExVQCpTHImJgFKlQ1BxyDtvqaESRJnck/wrOCtXy3MyldiNcbeKTR PyE2v96CA+L/yLRU8skXIX3P/axz1mXbzrwGjH8hfnfdx/2dQgseK18wt4sS9G5uoX+E 4KuPyuYEApPL4TBWBD6d+qNlV0WvICHILTvXZwOzKVlQqKxmTnia9z8Hdfm0kO4dmDQy /k8w== 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 z19si7464495edq.486.2021.06.04.23.30.54; Fri, 04 Jun 2021 23:31:16 -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 S230103AbhFEG2Z (ORCPT + 99 others); Sat, 5 Jun 2021 02:28:25 -0400 Received: from smtprelay0027.hostedemail.com ([216.40.44.27]:46536 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229726AbhFEG2Z (ORCPT ); Sat, 5 Jun 2021 02:28:25 -0400 Received: from omf07.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 8A31A1802912D; Sat, 5 Jun 2021 06:26:37 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id 98C4C315D74; Sat, 5 Jun 2021 06:26:36 +0000 (UTC) Message-ID: Subject: Re: [PATCH] docs: checkpatch: Document and segregate more checkpatch message types From: Joe Perches To: Dwaipayan Ray , corbet@lwn.net, lukas.bulwahn@gmail.com Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 04 Jun 2021 23:26:35 -0700 In-Reply-To: <20210605055932.18393-1-dwaipayanray1@gmail.com> References: <20210605055932.18393-1-dwaipayanray1@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.90 X-Stat-Signature: hmh3oriay35e4o3hn3mjeph7fncoca7a X-Rspamd-Server: rspamout02 X-Rspamd-Queue-Id: 98C4C315D74 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/gd7cuwJi9uVQjoxeLfP2WzppMLdcGsO0= X-HE-Tag: 1622874396-207889 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2021-06-05 at 11:29 +0530, Dwaipayan Ray wrote: > Add and document more checkpatch message types. About 50% of all > message types are documented now. [] > diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst [] > + **DEVICE_ATTR_FUNCTIONS** > + The function names used in DEVICE_ATTR is unusual. > + Typically, the store and show functions are named as name_store and > + name_show, where name is the device name. No, it's the variable name of an attribute of a device, not the device name. Typically, the store and show functions are used with _store and _show, where is a named attribute variable of the device. > + Consider the following examples:: > + > + static DEVICE_ATTR(type, 0444, type_show, NULL); > + static DEVICE_ATTR(power, 0644, power_show, power_store); > + > + The function names should preferably follow the above pattern. > + > + See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes > + > + **DEVICE_ATTR_RO** > + The DEVICE_ATTR_RO(name) helper macro can be used in place of > + DEVICE_ATTR(name, 0444, name_show, NULL); > + > + Note that the macro automatically appends _show to the device name > + for the show method. attribute, etc... > + **ENOSYS** > + ENOSYS means that a nonexistent system call was called. We have a > + bad habit of using it for things like invalid operations on > + otherwise valid syscalls. This should be avoided in new code. Please do not use terms like "we". Just use passive voice and not any first person/collective words. > + > + See: https://lore.kernel.org/lkml/5eb299021dec23c1a48fa7d9f2c8b794e967766d.1408730669.git.luto@amacapital.net/ > + > + **ENOTSUPP** > + ENOTSUPP is not a standard error code and should be avoided in new patches. > + EOPNOTSUPP should be used instead. Better word choice is like this section above.