Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1819908pxa; Sun, 23 Aug 2020 18:07:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMmT06WxJ3ziz25vbghr89t7fDt2ydg7IixmPh3JRXEwSNO7ngws1MsW0FZc11Haw9yrcU X-Received: by 2002:aa7:d596:: with SMTP id r22mr3320418edq.204.1598231243665; Sun, 23 Aug 2020 18:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598231243; cv=none; d=google.com; s=arc-20160816; b=bTT7pO0qMrY1MQUoZytnh0At1JpW1QoQ3CiO8oyEXE5jnFKxHebC7DmeYs7WtieVmV nds3BT8mc7PfmTZS+McGFPL56rZGjgcdlNqQ/t8D7DQ5cTlKuZ0fmWrtPwrEeeCPn//F nNCOdDofMWyGMD8Fp2anMNEEeoZ+Iv+K2w0+lR9IHyyDIdxJz1fd1zgH4ZXewTrB1B5f OPRa72d0Ln7haphDyHw3SmccOzUsoNKiJSt18tI2z4lBYVPPxEB7xB7rU+kW6fNyi3u+ UM9hPN1OF1kkyU4Vwsr//wR8SpNAi803WMddnApxB7b4aHuq4h/9Nl0OVssH+MEEa0Fm heEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=4NlLeracp1Q1EGApUcV9QLaiOED5uDM1qSb9x8tDAhw=; b=Ku5/Y/FyiIkeiI7wXlJZj/W7BGw05z/tS/0Thnad1F9Yl14kMhn7uAbMqnPyIWeb1n FL5Ck1UjvVsr/qaJ2nDH8quvDlvNWw24MU777hclfprtJZvoAYqudam6nczSvMZ26whg A92zyXhIVMIys1HksOqWg4jWuLuWEE6u3URqx024pKhD+r9g7YTQOhyaNLL7pWbv13cl 25swUG+oqSQWXckBERADN50Jl116NNYOWhLB46q7V+EQTyVJO+aNalTar7FsJVrvPC18 qFfUKhB858vQhXWy7XQIhLhhKTdhtqXAGjT6NHUWzh03m6qFywEq+IbimsO+YpR31tWN rl9g== 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 q24si1869312edw.322.2020.08.23.18.07.00; Sun, 23 Aug 2020 18:07: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; 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 S1727906AbgHXBEz (ORCPT + 99 others); Sun, 23 Aug 2020 21:04:55 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10313 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727902AbgHXBEz (ORCPT ); Sun, 23 Aug 2020 21:04:55 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 197FCEC66F3A41648B0C; Mon, 24 Aug 2020 09:04:52 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 24 Aug 2020 09:04:44 +0800 From: Tian Tao To: , , , , , , CC: Subject: [PATCH] mmc: sd: Use kobj_to_dev() instead of container_of() Date: Mon, 24 Aug 2020 09:02:36 +0800 Message-ID: <1598230956-58523-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao --- drivers/mmc/core/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 5a2210c..a0d2c34 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -735,7 +735,7 @@ static struct attribute *sd_std_attrs[] = { static umode_t sd_std_is_visible(struct kobject *kobj, struct attribute *attr, int index) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct mmc_card *card = mmc_dev_to_card(dev); /* CIS vendor and device ids are available only for Combo cards */ -- 2.7.4