Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp496616pxk; Wed, 9 Sep 2020 10:39:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOrYuS/jEiPe3JJb+0dyyNBrnvzL2KQZZl3zM8g2mLSd2742dxdkcSMF641cImkulSrTkB X-Received: by 2002:aa7:c7da:: with SMTP id o26mr5375748eds.261.1599673151961; Wed, 09 Sep 2020 10:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599673151; cv=none; d=google.com; s=arc-20160816; b=U/DdzcEtATiO1jAaQyNbuNsD+/iDf6g8up+cUmBQtdmtR8/3brecH65IFoIKr5dRKS hRdSNt7i13KIgNaz7XF7xo3vxJ8qy26nCH4yxrI2oDey7I+xSdLKOYY8yuUu+jt1SY14 nUsNcIj/fYDvUAfYBAI0lD48k8yb1G7/N+52nZInk4udvtWEFn0VUyzo0jDTsJbNs6jg iq8N9h1QQALZ87qEiI3nqQA7bCDPZRFEz9OwC+6DgcHbTBNpirOAvITnJJ/d8OjxlMu5 c+XePwe1kJ3Rw4OfbWgVEHH09J7bYCw9U0lr6TP4DtltriTagW29uEbj7czEDwNfFhWy 1OkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=8ivWCi6A87BfBP/xJ6Loa/1Uigh7AmSb7BWsXiDEyuk=; b=kZiL6u5DQIM2Eg0P1VSCzONVAbwbIdsSyBDvWXB4P+OBxLXRkFUVluruJnw4EnzDYI WfEel91eXmkDMGSJBB9zTfnQ1NHrT0bvx8msMvLy+6PJALu656T4jh7deM1VTXZ59/L1 s8wXKFbvFaX5QNog9GnRP8NIj9EpcCv3Ggez8JGPQVKZWGS/aog+6YmWcBa5iQxYb3CY ueYomUplPBqRPhHkL1IvCfwMizFJ0ZTZueDzbpvZdmia/nC0b2oCwCO46Vk/O9lRAB5w qTSyQif8Vt8FVQzhIog4Hx0EB+r+H5LfCKcJ5c08HQiArjvuzgAfRHWk93VO+XieFOMh YJTw== 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 f24si1954988edr.375.2020.09.09.10.38.49; Wed, 09 Sep 2020 10:39:11 -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 S1728643AbgIIRgJ (ORCPT + 99 others); Wed, 9 Sep 2020 13:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgIIRgI (ORCPT ); Wed, 9 Sep 2020 13:36:08 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE625C061573; Wed, 9 Sep 2020 10:36:07 -0700 (PDT) Received: from lwn.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 5520B37C; Wed, 9 Sep 2020 17:36:07 +0000 (UTC) Date: Wed, 9 Sep 2020 11:36:06 -0600 From: Jonathan Corbet To: Denis Efremov Cc: Harry Wei , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] docs: filesystems: replace to_dev() with kobj_to_dev() Message-ID: <20200909113606.37ffc039@lwn.net> In-Reply-To: <20200830144135.6956-1-efremov@linux.com> References: <20200830144135.6956-1-efremov@linux.com> Organization: LWN.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 30 Aug 2020 17:41:35 +0300 Denis Efremov wrote: > Commit a4232963757e ("driver-core: Move kobj_to_dev from genhd.h to device.h") > introduced kobj_to_dev() function. > > Signed-off-by: Denis Efremov > --- > Documentation/filesystems/sysfs.rst | 3 +-- > Documentation/translations/zh_CN/filesystems/sysfs.txt | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/Documentation/filesystems/sysfs.rst b/Documentation/filesystems/sysfs.rst > index ab0f7795792b..5a3209a4cebf 100644 > --- a/Documentation/filesystems/sysfs.rst > +++ b/Documentation/filesystems/sysfs.rst > @@ -172,14 +172,13 @@ calls the associated methods. > > To illustrate:: > > - #define to_dev(obj) container_of(obj, struct device, kobj) > #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr) > > static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, > char *buf) > { > struct device_attribute *dev_attr = to_dev_attr(attr); > - struct device *dev = to_dev(kobj); > + struct device *dev = kobj_to_dev(kobj); > ssize_t ret = -EIO; Applied, thanks. jon