Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp205259ybm; Thu, 28 May 2020 20:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2SB7v/aEmy9GZj02oxk1Ad5erPKtWOPf/G9hLRJTHs5Y9fYALNalmoI/ByQetNXlUA50L X-Received: by 2002:aa7:d0c5:: with SMTP id u5mr6106592edo.51.1590723923346; Thu, 28 May 2020 20:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590723923; cv=none; d=google.com; s=arc-20160816; b=Id6XpzLt1Q7exYrUyIUsnyY57xrfVZDmV4khVlASaFq+O/UtqCnavAYl+/5h1+3tlB v7nuBzGrhqQDdtIIYoy8Q20rUpbkC6MNDOmoq10lQmK1M126PuPmiM1CT41WU3Cq7/6P xwHbCOgr4wwZWjSoc2tyMoW/+fdehjY57g7yhqS+lP564jfmaEdjfGzM90wf2qu42x5z iec56VJt09MJ8LOLBD/9OnQI12TpWj1A8DNr6o3cFisjG0ZxnqRMvjopnIQBF8+XhPPy dxG6MQmEXWcdRt8UHFS3phFE/pI47PpJFTAkGQYOmcAX3Lhlh1j8dQCh+ACPOd+fhR8q QTvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=dUM0rLjJMLBDCp4mui5XTo2X4iZFVh/+VCE0yq/m+4k=; b=HhXArUsSJXxXDehSBp8s0Rl9JHmz60i7rGsNieT5u77Y9BSwvLRqJtGCTHF7+FWrSM 8MhMkt6vZN9liTgzFti6l66PITAG5+CWit/cXjckgazUMvDofZ6065/t1fJ4Ok/5sRBI Nu82Hu5AmdmrZq3I1+EsZF9Hiv4X7DAK36MH5kTxxgLV/AZKkw3w0pji98iRo+6wj8dY G4BsLUyCru3chBdDVonOTGdrAYgEkIFGtoigV1E9AKQH/CW8CBxtPATf9vQhvRQ34Q+i lKaCfNHAyv68uMFDlcpggutN+f6YplNeiYkfu9SVn9wi70p/w9vXzSZ+pRiXkw7EpmKJ hLrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kW7UBzbm; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si4849946eji.578.2020.05.28.20.45.00; Thu, 28 May 2020 20:45:23 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kW7UBzbm; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407182AbgE2DnF (ORCPT + 99 others); Thu, 28 May 2020 23:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406686AbgE2DnD (ORCPT ); Thu, 28 May 2020 23:43:03 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D9CBC08C5C6 for ; Thu, 28 May 2020 20:43:02 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id cx22so568738pjb.1 for ; Thu, 28 May 2020 20:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dUM0rLjJMLBDCp4mui5XTo2X4iZFVh/+VCE0yq/m+4k=; b=kW7UBzbmji9y/ZcbcW0RIqSC6gFMIV97+6oQsMVyXOGZq9O+aXXY9Ec+w95AJ1XRu1 QHabUGIn7eMxVSdblwL7AG23J8unloZtv0Fo8k50DhLgkU3cj0NBYhS+cScbMWFptaNX W/azwMWVwyezLWrBnmz03l613FRwyesguvgZac+icd4tHXevxkihsWrD7YG9Y6gxWKMA XS0+0Ldv6H8x1oajnywMuGGlpxU4y3H6+PBmCTbqENQhgSuMcVkCvcrs4u3KIEFR4MeK ZnMPrmF+1R21T7c0NPUzps+H7H6NLsutmQPpBpqtP55wypnGsXFusO3BFxH/dW8OhjEN +aDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dUM0rLjJMLBDCp4mui5XTo2X4iZFVh/+VCE0yq/m+4k=; b=X6PP6r18SomALZyr7qDLqVFhEOF2mrqX0M65TOFdy5C/TTZxP3WgapSpVUHwWaroC9 omIV7l0C4Lwt8tENWpzeNroiEZ5FiiOCotKGiCJ3X849bVPWntVIcPJHaQFeHI9LrmBM KyrwuEgFKydP+IaL33sebkR+XFxfNI63oNxsgWv9jvbSobnHH9nPUMFIWe+sRCe1XDnn MHIqK9nQ0gtkS7fvdm07TlGCZwLHpOyYeCx7x2STOQ1SemE4x7SYDioOSi6yKtuKHTjT bvoFf3hojipfpGk4dC6I/k0Th1mO5vHm0JOUufYnNyQA7loh+52au/O51SZkC8FK1jf6 OvcQ== X-Gm-Message-State: AOAM531Moeo0PPHmTysuOk9CbokmsjQNRXkqfmFARxjLMGuHquoLg/2J i9/CJh7joTNkr2+SWSxxF66wwpIu X-Received: by 2002:a17:90a:2e8a:: with SMTP id r10mr7205477pjd.33.1590723782175; Thu, 28 May 2020 20:43:02 -0700 (PDT) Received: from localhost ([43.224.245.180]) by smtp.gmail.com with ESMTPSA id 25sm6620225pjk.50.2020.05.28.20.43.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2020 20:43:01 -0700 (PDT) From: Shuai He To: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Shuai He Subject: [PATCH] drivers/dax/bus: Use kobj_to_dev() API Date: Fri, 29 May 2020 11:42:57 +0800 Message-Id: <1590723777-8718-1-git-send-email-hexiaoshuaishuai@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kobj_to_dev() API instead of container_of(). Signed-off-by: Shuai He --- 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