Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2161241pxb; Mon, 20 Sep 2021 13:58:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydNbPuwuxQj7e6EKLroi1BKq05rBV+4AlMmYLOZLvYHdJD6npSvkgekAd0TCGa5rsM+q7I X-Received: by 2002:a92:ca82:: with SMTP id t2mr18689176ilo.151.1632171533398; Mon, 20 Sep 2021 13:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632171533; cv=none; d=google.com; s=arc-20160816; b=DF2aU73zSfo2ZupZTCZrKC0E8HqIlTTzH8io/YE9QzJHx4XRD/HKhT0p6eYdx/mOmh SPxHT4osoO7f4YWXMu1bhklMsxiZhw/odRWgwl0Azjsj84YM991d+JHHXlW+PcT821/j eoUbWZ28jnwJW2C0heobgHZfbD59PcYbNwpwgYGcQ+E1TUqObAYMvB06F3opexY+IRco VSv2v+8/uA32ivya//812wFXWefz1ABmA72IrMIVeIxq93Yi0G9io5cZh88TwLJGlJ1u XXah4A0MMoZrTML37L6cCSe9mQQeftU6/3bTSrWyEl4XALcx2KBUROcTyRuSGROa+wjr H+cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=tCMyAI4JO6VKkU7AmoNIAzglb9xaZgl9kmlNL3VEvL4=; b=vLrQkYQxDOBNZWQH1t62rzWhRkAZKTQkidSw9bCMilSkFog7SfuojRPwaooU1+zOje BSJ/BrTPuVdR7DnUagWgHZMU7QMln+XfB9VTpHkHZBLr7CRUZA2OOjx7hDM3w4yQg4gr GV9PEBoTP4J62cz54FJ1EOX55UpEPhFgFKZvNi/9x7xxGmt5MQ8ES5YorGzu6hjj03/m U4ptvURlo4OMp/EMnW+Nvb3EfNBBMpW+87FC/RwL7cqeTwSR8Pn4pKIdSDETimU1DWDH 5j6kAKsntw2ouIOmvpVU80SlQ/mWuwVmGy8enHa50obhpZZYRtfkAU/8exizaVpPvygy Q6Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=JZQ2+zI+; 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 h26si13910157ioz.60.2021.09.20.13.58.42; Mon, 20 Sep 2021 13:58:53 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=JZQ2+zI+; 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 S229686AbhITMYL (ORCPT + 99 others); Mon, 20 Sep 2021 08:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233511AbhITMYK (ORCPT ); Mon, 20 Sep 2021 08:24:10 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 521DDC061760 for ; Mon, 20 Sep 2021 05:22:43 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id q11so29102270wrr.9 for ; Mon, 20 Sep 2021 05:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tCMyAI4JO6VKkU7AmoNIAzglb9xaZgl9kmlNL3VEvL4=; b=JZQ2+zI+W0SL7cwiKWYbsuiuWplyCzFrYondKJhbn30f0ST4w3KQPKCOEdfN2X7qL/ e4Hf5Vp6LoppSpnYVor+/hGghyQHmG3ZsUR/ZkmnRXReGgnd/kbYeYCMGt1miVcU5f3G eNrhTmqpmBt7jczLwm/DagTdp961iGwu1mGwr07e26mO2nxiv9gSoHKsqNmjtJHR0HcX hI7cPlwBB2bo6KeAzNOUNVycXeEL2/Q1YCKti0uiy/CKnOWe/u0dsztQYYvqJgGdIRbD CvhkmLu1/MZ9EDXANpLWWBXiXKRFLqRL7fo7MybclREbWmfjsU5fKJc/MxS7ek7iq0wc 7WCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=tCMyAI4JO6VKkU7AmoNIAzglb9xaZgl9kmlNL3VEvL4=; b=QtS/Cfm5A3el8HeHpvbKVFOt2aoXW+y/j6buRZMaf2xF3O8Srg0FMdgH3AOUxDZ5lK 0k1BiB8pzZhbwT7f+5f/mQjacqjH5xAKpKBLK38w9++Lpf4Zrqe8ieYnUQaW8vOa46AO S6pSPva3vY4twy2s5gPb00rggDlWOb0GB0gyEoU/SOKUFoYJToOIiuquHvWwe0chR4WE GhSr6cu+DOWp6t0sISICjg2+cx8+9vc2DkGdtFSSp86K/8OpY8nlmu7v22he31/tNvbl kVMVLQvoD4IH0+iWnfx6gizmkczbh7YtpBA8ZKhJUHqVb1+OdWgkFP3E493rcM8MjooG IE2g== X-Gm-Message-State: AOAM533T3nOlVb1E6uQgZ9P05htHkdDw0QjNy/uS5bFn8Lz3acI8e3lT 7psQ4zmxwxnV0Jiu3nn7LamngZQycDJaD4oX X-Received: by 2002:a05:600c:17d1:: with SMTP id y17mr29272700wmo.135.1632140561722; Mon, 20 Sep 2021 05:22:41 -0700 (PDT) Received: from ?IPv6:2001:861:44c0:66c0:aa8a:ef22:59c5:1bf3? ([2001:861:44c0:66c0:aa8a:ef22:59c5:1bf3]) by smtp.gmail.com with ESMTPSA id a72sm19889422wme.5.2021.09.20.05.22.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Sep 2021 05:22:41 -0700 (PDT) Subject: Re: [PATCH 2/9] firmware: meson: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> <20210920090522.23784-3-wsa+renesas@sang-engineering.com> From: Neil Armstrong Organization: Baylibre Message-ID: Date: Mon, 20 Sep 2021 14:22:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210920090522.23784-3-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/09/2021 11:05, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang > --- > > Build tested only. buildbot is happy. > > drivers/firmware/meson/meson_sm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c > index 77aa5c6398aa..714016e3aab3 100644 > --- a/drivers/firmware/meson/meson_sm.c > +++ b/drivers/firmware/meson/meson_sm.c > @@ -240,12 +240,11 @@ EXPORT_SYMBOL_GPL(meson_sm_get); > static ssize_t serial_show(struct device *dev, struct device_attribute *attr, > char *buf) > { > - struct platform_device *pdev = to_platform_device(dev); > struct meson_sm_firmware *fw; > uint8_t *id_buf; > int ret; > > - fw = platform_get_drvdata(pdev); > + fw = dev_get_drvdata(dev); > > id_buf = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL); > if (!id_buf) > Reviewed-by: Neil Armstrong