Received: by 10.192.165.148 with SMTP id m20csp533494imm; Fri, 27 Apr 2018 03:21:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoKIWuRz0l0Nk/RSjHVpqM0EhPG9SRko2RTGstc881kBS+Sfxfg4IyHjLivuZlkweBOn5Y6 X-Received: by 2002:a17:902:8bc6:: with SMTP id r6-v6mr1801372plo.66.1524824516900; Fri, 27 Apr 2018 03:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524824516; cv=none; d=google.com; s=arc-20160816; b=orAPE/VOMxCTnt28/MYtDjO837695F5i6MkTiXld+XqRK6oCkpJwNUsua2cQjviqnS DpAH5ryskpzlgQE3zBFZ/ZlmZGYonfVnxqkZ+/UhXn1lE8TqA3xXwoKnOHwdUywUhNLT ykdy1SE/mm7rgjHkHGLg2sUwXxhyGO1JFuOvCouM55SLP4lgfDCnxp9gDxLzaRIuGIPh V9TQOom8aJakGG17tSbt+67OQLDalKCLB/wbmO09IiFk1uDTUpJ644aEyWD9BsAeuR1H yHzmxGVCjC+LobhsAj22vJ13GRqvEVVZQ/hlQ3KRS0zquLcDmmklsNaPPUoMH/4sXYih l/cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=UMcO1KBDCOMQNGuBO+hNHWK/k6Gv7rOBi0ZTcjix9Nc=; b=au0OxpucQOH5gzAHUIYL5mnCYSdiAnfeHi+p+tnmvNsDngeWWJliVdO4yc0y1Fj9/C B+ZVT0F7wFtZrqtYfN9wMAb7BsItWABefclbEixo5USrz8rdX/H77Tho81Pp/LroBeyM 0T4anE+aABkBC1vmX8UHtqd7CeZk9OpBum3uQNX//HWddl5Hi2f+jbKv/ig516lYwyV9 Y6M8DrDpP+I5oyA+RrfrJLuSmtKe+T4iMUBSBBvvZzbR9fQV7SZQNS+VmlYEboPRXitN votCe8KXOkXaxwDYLYU6wKHL/+RByPQDwN7YYgRLh6wxJ6uSwtVp9iStAYH9Udbfzk1Z lOSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34-v6si958526plf.362.2018.04.27.03.21.43; Fri, 27 Apr 2018 03:21:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757962AbeD0KUj (ORCPT + 99 others); Fri, 27 Apr 2018 06:20:39 -0400 Received: from sauhun.de ([88.99.104.3]:48152 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757810AbeD0KUg (ORCPT ); Fri, 27 Apr 2018 06:20:36 -0400 Received: from localhost (p54B3385F.dip0.t-ipconnect.de [84.179.56.95]) by pokefinder.org (Postfix) with ESMTPSA id 3B53832475D; Fri, 27 Apr 2018 12:20:34 +0200 (CEST) Date: Fri, 27 Apr 2018 12:20:33 +0200 From: Wolfram Sang To: Dmitry Torokhov Cc: Wolfram Sang , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Vladimir Zapolskiy , Sylvain Lemieux , Rakesh Iyer , Laxman Dewangan , Thierry Reding , Jonathan Hunter , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH 20/61] input: keyboard: simplify getting .drvdata Message-ID: <20180427102033.msrr5sourxrtypg7@ninjato> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-21-wsa+renesas@sang-engineering.com> <20180426191947.GC162443@dtor-ws> <20180426200401.lvqiy4gnchkwr4qw@ninjato> <20180426212327.GB210716@dtor-ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ro7fbsqyzfs5cg2h" Content-Disposition: inline In-Reply-To: <20180426212327.GB210716@dtor-ws> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ro7fbsqyzfs5cg2h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dmitry, > > Isn't it actually the other way around? platform_get_drvdata() is a > > convenience function to access driver_data which is embedded in struct > > device? >=20 > I guess it depends on how you read it. I always considered it separate > because none (?) of the bus implementation assert this in comments to > XXX_get_drvdata(). Well, even in the case somebody will implement a custom driver_data for platform_devices, this person will need to convert all current users to 'dev_get_drvdata(&pdev->dev);' first in order to avoid regressions, I'd think. This is what my patch does right now (but merely for overhead reasons). Or? > > > in the future, so I'd prefer keep using the proper accessors for the > > > objects we are dealing with. > >=20 > > Exactly. I'd just argue, the object we are dealing with, declared in the > > PM functions, is a struct device. >=20 > No, the driver does not create a generic device, it actually creates a > platform device, or i2c client, or spi, or something else. The fact that True. > suspend and resume routines have generic device as their argument has > more to do with the language limitation rather than reflection of true > type of the objects we are dealing with. Ok, can be argued. I'd personally still go for the gain, but I won't push harder than this mail. Regards, Wolfram --ro7fbsqyzfs5cg2h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlri+W0ACgkQFA3kzBSg KbaA8RAAkAc1/BldRxZwTtZe+wdvyAJeqmAvEr0Q89w3mD9zRSGiUy6fyUziggtI xxWfsOlzCQFr2d1Q8oqiyrqC3S5VrvmNinOfdRVcFbkAwlwoprNlnLT9EIYJBQND 09oEqYv+SfaZMOGNjSBwL6udRJtN9UHxs+/s5xtox9xz0qLUla/iqn+mJ24FTQ6K qQ4GabIU8iRCUfIUaYozZisNJD/+6ikCVGBPQu/0kqYgSrFmdZupXHvVZ5IeAq7U cU+sBsz0SGEniPV6Q/GevnpJpfz4wrnU3l6c+kz82iGGoJmJu4Rg1vsj5krlXNx7 KMy/JZQ7lAQmChsSVHgSHw5qtxXKYQmlywDWf8TJeA6ELRdQKa69SjVo5jW4aWTX Ni73xwSWxZGTueM23JYw33lYzP+OtCE4I6DwnT25skqzT8GHEHL/xMzYrWgiCpXL TWcIA28A3WW44PPCD2xS9rlSOhWjQIoETUZ1SVOkfxrXfCfGagZAtRc5NLU1MGSa JszHEFYSzi8pxVraoc+eZRgGtU5fnZrHwicRkNsouXqI/j6J37OUzs8VSnGNTmuS LRoEOQ5Y4zbw5ChRi13olVYuOmIa9oOnMk++4i/k8wMqjer+dDV9qtaZzs+Q+Tjp qkZMUdEdW6ggDX+Hzcgb3d5wFIts2aNQb1S8D0aY+MAk5EG9p3k= =rOVE -----END PGP SIGNATURE----- --ro7fbsqyzfs5cg2h--