Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp221896ybg; Sun, 31 May 2020 22:49:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSQOkFA/xd1mYuFH8RcmvUO1QJOe4cILSMeRUa9Nya74HaYAyCoSDJMRJCfIEqAl6z2MAs X-Received: by 2002:a05:6402:1767:: with SMTP id da7mr7094743edb.90.1590990576192; Sun, 31 May 2020 22:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590990576; cv=none; d=google.com; s=arc-20160816; b=Bk3TkEocCHKFA6yGOnfw4cq/Fpy9DpeJlitQqEgBAp/fbVFrOD8tMqTTzMV1n7MZA2 RKghpNHQpBze5luh4QbURuB4d6MzFpQ0P9UOhT/LDbcfI0VvX2oTReD7fqHuxgvsjvLQ WadEqSlr1f05/4URURegLdGaalAaKOLotduyjyRZ/YpNsXe2negbT/LdfY8R1HkoZKoE v86C2TIObZMoVxcWb3MyvfZwbPsGN1YfJYxUesPbfV3Z2sMsUH5Cy0GedOgsDAxDDuRa 6cvVdrROc1cPgiliRI62iE7LdgMeK4Pv3C3zJQph0io5uuM79Kd5xrczdk0RhiqKXlA8 NxJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=hjTB7yM9OdLuP9ky6NxEfo4ad8sH3xL68tfeUKmfe+g=; b=x+ZcbCI1eO2vxhrQzzvf2PEvvwJjpZSb6aJR9OtRdtFisDnkLmKDy/OwLknQ3W+eY9 FTRk1O87nEXB0brAPlANonYGumx/90EvWDN+b5sO+jbJ87FT8gQX0Y/uzvmvt87fnlvG IAEVM7djTHj4pbuiQTPDc9iikeGbgCUzAs9UBLIg6Uh7QTLxCKwxIbRSoNyOI/v6cAGe 9R/3C4JI+HrpxD2UCpZxu4B0Ec8ekhQTJ4uOcHYIWmuw/mVs8cOx8sCpaWQP8NltCuAI EFj2N8/hgXCE2cbZlfU7cWgj3mqzvg6WpwM0R2NZHUL+tHXjFZggI5v+HDwOzqAoBFeC 0lUA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w25si10494097ejv.102.2020.05.31.22.49.13; Sun, 31 May 2020 22:49:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725886AbgFAFpQ (ORCPT + 99 others); Mon, 1 Jun 2020 01:45:16 -0400 Received: from mga05.intel.com ([192.55.52.43]:39018 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgFAFpQ (ORCPT ); Mon, 1 Jun 2020 01:45:16 -0400 IronPort-SDR: J1oYJwaUd8OYyjJKqX0EytjGJlmCupzJPuazQRSMm8m7Qcluirc5hFW2vZqrhWXkp2Z/cBigku sfSgCtAIvnkw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2020 22:45:16 -0700 IronPort-SDR: JxZ75MqOuUf8l5cClPSYYtbPsPm4Ulj/NgfMiJbogtdgBvy1GiF1e89Udz1NeecgJz8tvnjWVy T/wcQzU3zerg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,459,1583222400"; d="scan'208";a="268206982" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by orsmga003.jf.intel.com with ESMTP; 31 May 2020 22:45:15 -0700 Date: Sun, 31 May 2020 22:45:15 -0700 From: Ira Weiny To: Shuai He Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/dax/bus: Use kobj_to_dev() API Message-ID: <20200601054515.GB1505637@iweiny-DESK2.sc.intel.com> References: <1590723777-8718-1-git-send-email-hexiaoshuaishuai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1590723777-8718-1-git-send-email-hexiaoshuaishuai@gmail.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 29, 2020 at 11:42:57AM +0800, Shuai He wrote: > Use kobj_to_dev() API instead of container_of(). > > Signed-off-by: Shuai He Seems reasonable: Reviewed-by: Ira Weiny > --- > drivers/dax/bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > index df238c8..24625d2 100644 > --- a/drivers/dax/bus.c > +++ b/drivers/dax/bus.c > @@ -331,7 +331,7 @@ static DEVICE_ATTR_RO(numa_node); > > static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > struct dev_dax *dev_dax = to_dev_dax(dev); > > if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0) > -- > 2.7.4 > _______________________________________________ > Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org > To unsubscribe send an email to linux-nvdimm-leave@lists.01.org