Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1040469pxa; Fri, 28 Aug 2020 01:48:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDep6KIChIkDc80Z1ptgvG9400dLq8JV7cKBGwPVWJDMUb6C/PMGN2KTINgGzOaN2MLaP3 X-Received: by 2002:aa7:c143:: with SMTP id r3mr741107edp.38.1598604499595; Fri, 28 Aug 2020 01:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598604499; cv=none; d=google.com; s=arc-20160816; b=GLfO4KFfO7RanoMXsGzdJbM0d3EHT4Ofk3CxgvJxbA2Cu0D1tMlNLRUsk4vcU1ha6h aMpuPM71PseP1qZCjLu77kpdl+2cyO7gQokbgsPNav8ifxrtI2IMKYKWd7jpevmZuk4d hw4hRDWsG0/maFvM4OfMmujxoY6DhV4CxGT3sNXiNnqfnc6K3tj9N12ADeUh2m7MLcpr HlnMG2CqDMUy99zKR9++20cQA46mn+IPmCD8Jh5NZes6Hm3IazYjUlc4de9r4Kev90mf y/Z3t7wLzaeG4I3Fqx0mzdGYFCmj0l0jM4MaFZPTvl8DcLxq57qxjCsLOHar9TB1jtsq yokQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2B1i6AAkwRUTmhr5yA7hQS42gfZuyqP5S7cfp1eETfY=; b=hXuUn6FzgZlTAFxRVGYojAocc57lYJ89R91srXSU+m4DoMX8xXMsw9hXhwwtO2Cn/R QJPrXCqVdfkT42fp4XQ4GTC4rHLyZh7yFD3k+kl5rquPGTk+UJy1n/+KEw3uV0zDz0yx mQFZNctUDUWX7XKmoG7logdpzMHMv7xqxMpyoycz/8ddh9Ndw7TvBq2V4ydjVVySq/Lu 3ZqcghYr7tKwpRufk2nWyqNjjZRF6qQozH1ulmmGdElEdI/mRZnddLRp825LfzZs5ap/ b6DHNv9+r/r2VcQL1jWIu7yz2LolM0R97+ZjoSVpifix84Pxj+FTOxbFKhUDJACYKku2 z3JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F5+j9M80; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l91si152199ede.242.2020.08.28.01.47.56; Fri, 28 Aug 2020 01:48:19 -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=@linaro.org header.s=google header.b=F5+j9M80; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726643AbgH1Ioz (ORCPT + 99 others); Fri, 28 Aug 2020 04:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728710AbgH1Ioc (ORCPT ); Fri, 28 Aug 2020 04:44:32 -0400 Received: from mail-ua1-x941.google.com (mail-ua1-x941.google.com [IPv6:2607:f8b0:4864:20::941]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F5CC06121B for ; Fri, 28 Aug 2020 01:44:32 -0700 (PDT) Received: by mail-ua1-x941.google.com with SMTP id y15so137902uan.9 for ; Fri, 28 Aug 2020 01:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2B1i6AAkwRUTmhr5yA7hQS42gfZuyqP5S7cfp1eETfY=; b=F5+j9M80/4/+TdhmpFxuKDr9MPyb0usYY3RisdpDKbxeIZsjJoGToJP6nC/xjg0Jsk RXgthIDyPR1Mnl/87yltYweBft6QdA0JZr2JIw8Rurfsa0xfGK6YrfWTheteJn1Y7smg PiOJk4KaFc+3tF9C1ECVa/1xYRWfpZP6Vpde+PbfwkahB6GPw9ZAE1aBX6w98r0NtbHt a3S6KyPybDoxGnqTn6F5mR/vzEbfGrnkclAHiIVf2t3dxAB+21VfdkjV7WuFhbYESO9L 56DqOTODyMbHZBCUE66D+H5ebuNci9Qqv0XzOo6r81jIqkiactvlS5rjq2f7RRDkUT+a GNfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2B1i6AAkwRUTmhr5yA7hQS42gfZuyqP5S7cfp1eETfY=; b=qyDMRkNXABMmxOJcv00bi209jyDsig72diisTTbI+KER1n9Fel9s1936cr6JctYOL5 hJWcCPow0R869FrR5TrmDZmNJpjK0XuNUYHKVPrRXRmVQV5CpVgc4A2VSqbqzstref8h 7N2RcdbembM08YmPgGVZh+rHgnz+SbzGCgK5hY3XjJj6UYSWFfmbzov7Qz07HdcMVP3d 8oLFPlRk1mDEuA4pLQbm9lbc3PyUyusV3r7aC2Kh7GdGW7hfI1sgOH01SuAgw0QaLNS4 FEPlDMyXc2hkIRuBi+geLW7SQpDXgSRI+DS8QJdBc/D6GKdeG0grWVXWORzTevV7KSMO erLg== X-Gm-Message-State: AOAM532FeDzuA4Qp4m7MTWw4lN9ipFDPqvIgO1CzMyEuq2nh1qIYRhln pFi4WIHGPsDkIENoTXqd22xLauXbuPFQqia/wbbjIqQ1yea3ZQ== X-Received: by 2002:ab0:3a85:: with SMTP id r5mr322072uaw.100.1598604271920; Fri, 28 Aug 2020 01:44:31 -0700 (PDT) MIME-Version: 1.0 References: <1598230956-58523-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1598230956-58523-1-git-send-email-tiantao6@hisilicon.com> From: Ulf Hansson Date: Fri, 28 Aug 2020 10:43:55 +0200 Message-ID: Subject: Re: [PATCH] mmc: sd: Use kobj_to_dev() instead of container_of() To: Tian Tao Cc: "(Exiting) Baolin Wang" , Jisheng Zhang , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Philipl Langdale , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , linuxarm@huawei.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Aug 2020 at 03:04, Tian Tao wrote: > > Use kobj_to_dev() instead of container_of() > > Signed-off-by: Tian Tao Applied for next, thanks! Kind regards Uffe > --- > 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 >