Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2209260pxb; Tue, 12 Oct 2021 01:33:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH9XknfxFa+mPIVK8HQOByeVdZcw4PlPRP1fjdkY2AHyAfpOsPOnGoDGw8HtGCsi41ODEC X-Received: by 2002:a63:2b12:: with SMTP id r18mr21465235pgr.256.1634027618448; Tue, 12 Oct 2021 01:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634027618; cv=none; d=google.com; s=arc-20160816; b=VvWFSec2XiTYkiAWkzgFXg8P+HnZQSTs0Psnwj+dn8ASPNRtKRFTma0F/gNToHI83b iMdhjG9GwFL+TTQCaalM7NM8UP6Mw45e+sdMywzMvzXxGry6bIFCqpGjemcbYW2y0RqL HYBJXvHNGWT/x39qxJGZP2p5bhlnbsl4aF/C6cECk/U8fbSAIjwfOm66lWbdq3PP04ED DVyp60i32oNBso62eLNeFLjOq8RebadaC2mvQ5f9xQYtz+mTqJy8bbbK+076h6jeQ03y cPYR2TWd8v9gNMQW8oR8E2a1jVZVJPwLxntNLWnLBqGO1G4oj027uG68qgz5q4DjUB1F z+9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=e5qbFrBXnmWgwuavYBB+NXAxswPWVPvU+nmnCp+J0ww=; b=LUH4jXqVHtD0nEvHTbSQvSbxoyOxZjqvx3ehnxk3bAsf2bwJ1JE5MGApaEY0zOU5uN P2uwYTg21dNzrMpmPRqJ3tJ2Nb8/6XEHKj+EY/RhkgtV6xQP5pSBzEBOXOWjug5rZRN4 wt6tniohNpyGjBVD19pkId5eEFggeLSXw+xvX8aeRUajcOKur+M06Ppa4jlkxV0Y4uj7 qOokHE60qLbJeLhcsQ1F4eMKlRMNoReOC8rH1ZogMsvLUXhTFYR1GCKd+eGQAexC6cNi u6zFHAXSKMO09Jfa/DTOKZB0sUAN4Z5sAulvGNdVlK59GjA15Sll097EOMG7Uid5M7Mo 4LTQ== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y185si13096238pgd.558.2021.10.12.01.33.25; Tue, 12 Oct 2021 01:33:38 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234973AbhJLIeV (ORCPT + 99 others); Tue, 12 Oct 2021 04:34:21 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3966 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234522AbhJLIeT (ORCPT ); Tue, 12 Oct 2021 04:34:19 -0400 Received: from fraeml708-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HT8371s5mz67nMv; Tue, 12 Oct 2021 16:29:23 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml708-chm.china.huawei.com (10.206.15.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 12 Oct 2021 10:32:16 +0200 Received: from localhost (10.52.122.204) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 12 Oct 2021 09:32:15 +0100 Date: Tue, 12 Oct 2021 09:31:56 +0100 From: Jonathan Cameron To: Wolfram Sang CC: Jonathan Cameron , Enric Balletbo i Serra , , , Lars-Peter Clausen , Benson Leung , Guenter Roeck , Subject: Re: [PATCH 6/9] iio: common: cros_ec_sensors: simplify getting .driver_data Message-ID: <20211012093156.00006cb0@Huawei.com> In-Reply-To: References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> <20210920090522.23784-7-wsa+renesas@sang-engineering.com> <716533b5-380d-be72-b45e-d9909f09286b@collabora.com> <20210925155445.1edf4752@jic23-huawei> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.52.122.204] X-ClientProxiedBy: lhreml723-chm.china.huawei.com (10.201.108.74) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Oct 2021 09:31:11 +0200 Wolfram Sang wrote: > Hi Jonathan, > > > It's not something that ever bothered me that much, but we have had debates in > > the past about whether there are semantic issues around this sort of cleanup > > as it mixes > > > > platform_set_drvdata() with device_get_drvdata() > > Yeah, I see this concern. Mixing the two makes reading the code a bit > more difficult. As I said, it wasn't so easy to convert set_drvdata, but > I will have another go at this. > > > Whilst they access the same pointer today, in theory that isn't necessarily > > always going to be the case in future and it isn't necessarily apparent > > to the casual reader of the code. > > That one I don't really see. *_get_drvdata() should always get > 'dev->driver_data' and the prefix just tells from what namespace we > come. If you want to change that, a lot of things will break loose, I'd > think. Even in the unlikely case of platform_device gaining a seperate > driver_data(?), it probably should be named *_get_pdrvdata(), or? Agreed. Does indeed seem like any change to this would be a mess so would require different naming etc. Thanks, Jonathan > > Thanks and happy hacking, > > Wolfram > >