Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3313123rwb; Mon, 7 Aug 2023 11:21:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IER6Z38hF/LGCeRs4rH0ZJ7Psz2jmWkWbIdMb8AClaqm762OgbxkQbUjYpIKgMZOr/o7jAV X-Received: by 2002:a17:902:dad2:b0:1b3:fafd:11c5 with SMTP id q18-20020a170902dad200b001b3fafd11c5mr9402629plx.44.1691432485728; Mon, 07 Aug 2023 11:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691432485; cv=none; d=google.com; s=arc-20160816; b=KPipMX7HLpHuxPPYchoU96kAv2xqvtNpBPkOYzjkh8711G7pg77eFJHyl9HPhbijDJ xS95waBLpDKRXxjw5bXilDt6WQpA3FOGXiQAEAsivmC+6sSK70U+sTnyvmgJRQ736ZM7 BztZEelBxxxdZy+XYB5QNYEcPA0cXkA2FNCDU0+G8vtiPnc6RhcHLMlDeepSE65PzVjN D+cdwUG0B174ta77n4Y6hA7A6P3/Tr7RBIwxY3Oopl2zaQPvWrKqYrZzYshMUqSg1JwQ uK9cjlG03bieVcV55CbwIphuo7tiu/GmwCkbo5MO+ITWO7dvgZBu3KaTPqiV9cHtty6+ i3Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=BeLMkdS4bEOt6i78w7d+SDLHGpVLJwpOL241iqSqZlk=; fh=n5mE8N3BaCHrSX41PWDBF3hKixoO9Ih0DBX97iUIs68=; b=lKdcB8PkG+0J7WbHbtld92x7WVvc4fdy1keY831rNLitKZqNxHOpolBzwBRb81tkhY QHhd5DzJEP5XCqAwjYc7zQ8slimSUW5DePUapk9I1M1F+drM70ZUesT3tNfH4d8hPrmM 9fehcvomxwLJQlnQGdHoSJtsWpEfZNMHHYhB3CpYG5Zk0K50iHFlNpv59+sNJc1TOsyC BwOxTTEXzsGkmVfDyhAKEUUqUAS6geUNSJTYwKjAKtVElgsTUBjoh3/ev3Ff+L9VfXV+ 3J1hXtJZg/v8mHcD7olOpTer7osJOMXbjj7d8M0GWzL0myIKKzmnkgnMZU1d1WsfBqR9 w1Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shruggie-ro.20221208.gappssmtp.com header.s=20221208 header.b=4zVRQB3A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb14-20020a170902fa4e00b001bbcddc33dasi5825497plb.180.2023.08.07.11.21.13; Mon, 07 Aug 2023 11:21:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shruggie-ro.20221208.gappssmtp.com header.s=20221208 header.b=4zVRQB3A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjHGRin (ORCPT + 99 others); Mon, 7 Aug 2023 13:38:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjHGRim (ORCPT ); Mon, 7 Aug 2023 13:38:42 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33800E6A for ; Mon, 7 Aug 2023 10:38:41 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fe700f9bf7so1287326e87.0 for ; Mon, 07 Aug 2023 10:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shruggie-ro.20221208.gappssmtp.com; s=20221208; t=1691429919; x=1692034719; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BeLMkdS4bEOt6i78w7d+SDLHGpVLJwpOL241iqSqZlk=; b=4zVRQB3AZ586JXNQoQhXr8R2SDlemOEvMtMspbdZsW+vLeuxbMmIMHV+DyTKCER8HN MxBAwgGntntyBWutPNqv8YSYlxuOoXPlalCRN9b2WMSYfNb8vplS6M8bXKCTOVwV1wV+ QJMe7Fs7cws4u8ytlrrKTP5pYVp5jdTXnshcW8+x/1jebRoXi0GB+B3iS8KD7XEYI0HJ RAySIoeW22nKEmzBzJVfSgq3HO08NrC8B4xRsItK4QRZAN2RqlWsV7t0+2Nx55q0PzsI z/Jzi1fH2enYJo0KcORl9KvqKUfT3axetwkcelwvEn3Q3DX3kTInTg7W11+HBdw5hZ2J KOIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691429919; x=1692034719; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BeLMkdS4bEOt6i78w7d+SDLHGpVLJwpOL241iqSqZlk=; b=GCmHtD6mC9DI+JA+vVX78+7lKbKn0NoCNKnfS5QpWN5BNC2jAOb0qaX1p7Po9++ry/ LjL/kl/EYJd/LIrgsk3IqgUZbJS+SPcdrnOPXtpDInnQMwcovO2Tyu7dK8aE46rhgLFz UBGmBXdQBmjvjLIHB1n38CIF94VPd0ddg5t4eHpB4wUOjTWP5OYc47RvF8LGaZBxgqnI vm71m80kn/ay7WHmzHg5cbP6/nBbpp5mY+SZ4G0JALhagRys81Eb/IVqVJn1qA169Jzj +t4A0+IBWhiC0O9PFit/z7uVO99vf29SsZgr7T6GeXZMrr+wvCYdLAVLW7IclrZtNgoA l3mA== X-Gm-Message-State: AOJu0YxmMpqP0P3EcCUePFxoGd1Eg8F0b365G3qXEvneLqsfqD04DCiN ikaiuL5LbJsktyNAwc69SfnXRgrtstwdfCXMfa0tyg== X-Received: by 2002:a05:6512:398a:b0:4fe:db6:cb41 with SMTP id j10-20020a056512398a00b004fe0db6cb41mr8477776lfu.39.1691429919236; Mon, 07 Aug 2023 10:38:39 -0700 (PDT) MIME-Version: 1.0 References: <20230807130217.17853-1-aboutphysycs@gmail.com> In-Reply-To: From: Alexandru Ardelean Date: Mon, 7 Aug 2023 20:38:27 +0300 Message-ID: Subject: Re: [PATCH] spi: gxp: removed unneeded call to platform_set_drvdata() To: Mark Brown Cc: Andrei Coardos , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, nick.hawkins@hpe.com, verdun@hpe.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 7, 2023 at 4:27=E2=80=AFPM Mark Brown wrot= e: > > On Mon, Aug 07, 2023 at 04:02:17PM +0300, Andrei Coardos wrote: > > > This function call was found to be unnecessary as there is no equivalen= t > > platform_get_drvdata() call to access the private data of the driver. A= lso, > > the private data is defined in this driver, so there is no risk of it b= eing > > accessed outside of this driver file. > > That isn't enough of a check here - people can still reference the > driver data without going through the accessor function. So, is that like calling `platform_get_drvdata()` in a parent/chid device, to check if the driver-data is set? Would it make sense for another driver to do that (i.e. check the driver-data is non-null, but not access the data)? I can imagine that being possible, but it's a bit quirky. Or, is the issue with the wording of the comment?