Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1259886lfc; Wed, 1 Jun 2022 13:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA1c22RzmEY/laFTsg/LuAyVfAkzvqpfer4gzzk526L2bEDGUgZ+UFSvLbm4xSxPUZ8WUX X-Received: by 2002:a17:902:a404:b0:166:1f9b:c63a with SMTP id p4-20020a170902a40400b001661f9bc63amr1214584plq.26.1654114962082; Wed, 01 Jun 2022 13:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654114962; cv=none; d=google.com; s=arc-20160816; b=tQURMjglfTBcoe0gijc5X8peQA6V2ts2/vIuhpoBlzZTyhfyOaGXctEdxH0+s3zVly foMt9Dcb+msQtq4Vij2D3m7816Q1IpAl197ul4k03+XUaDqqzI2o4BbQyzhjpk7G2QXb zbY1GTQP2l+WEveESY9RPIfb27ZU4vWmuy2jCO+KW6BDXZtaIAZyRpzjnr2CR7LN7Fya J/rNt5AjkMEagA9HW2qZdd8ajlTaZERQuuUYHQlaUVczxnPuXriGXYPkmWWYCFF9UDUA Y5bAxmSqIICRSCyj5ohmO98M6WKQFfVyEcEw6XcLOlKe5JY844xBaYSakm3uaFBsX9/f Ztdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ybk7O8dN6b6H5xbFDEoMCkqNz4qnfNPoCfwRQJbaMWE=; b=jzJ2YxoK3GfIsY8qQ7yah47ojtOcj+6qTgGzs+o7JrhH8GUbRWwueWcQtYMJj0pxCN XKOp+EanibiZ/4hskHXtm/vJghB2s+qsNL4W3tl12nJKZUiTItlAS+IfQfTCtR2pxkGE locely7mNuyHMzQNEpqwKQFWqBuBcwnKaor0lU0f+5OndviG5B4/iyjPIRSmaLnUge0d vrqLOGdeXZl6mxhypRQ2VsWm5PJsgzFQomc2XmqzqH+l14rD+UEt9EH6QJh6bJNiOEhM MC3/adzDySipDPLk8PZ4DR3wWLhum+N3h01Q76BY5Vg2vqsioekfbfIV6HSSk/q1QG12 UKlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=Cgm6Gprl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b9-20020a170902d88900b0016390a937aesi3206637plz.524.2022.06.01.13.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=Cgm6Gprl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55476B82F0; Wed, 1 Jun 2022 12:34:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348089AbiEaVsR (ORCPT + 99 others); Tue, 31 May 2022 17:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233452AbiEaVsP (ORCPT ); Tue, 31 May 2022 17:48:15 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C859C8D69D; Tue, 31 May 2022 14:48:13 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id c19so23574285lfv.5; Tue, 31 May 2022 14:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ybk7O8dN6b6H5xbFDEoMCkqNz4qnfNPoCfwRQJbaMWE=; b=Cgm6GprlcUCBuJ8R9gwHR/U6yIcGBQ1j0i9r/Y19cnMF6yfiex3zX156nHpM6PWbxZ /pasrG3B9WLzDjRSg3Q7QpcnySf+6cBKafEA49vxuVLkZJpRnM/3XXQsyl+P3iqrP2SR 3M4Fa5Ey7i3i7bXM3pUJK/vKrvfXa+8U6Fhk1pVwZ9ygtYHkhjQV7qO0x04j9NMsccis BTO4q01NB5fIL72dqBfydVgJ4d4gy5OrvsNgU7BYnblwB5wtD/MT2SyK/pBC3OJimTUd 8CrIKuGDEm/Ym6h5DCWj3n6hUn2ZSFdWWcm+1kdPlaOkhFqnPAyocNLGNNGYdKNwWKaC lXZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ybk7O8dN6b6H5xbFDEoMCkqNz4qnfNPoCfwRQJbaMWE=; b=YMTrGBWDQhefbnRIDiQLHEgOaPILwDU5xwi54alpQ3YVhk5j6+JwCTP9N81zXy2trB WiVklSql+f0P0XwdjYfTeYKG1z2h7f+ihH6690IRkBvn+uIH7wr2S/Mk6+d98cbe+SBh 4hkAHDYHg4vEsiX+bSfFbW7OTavwe7A+cEXNhSS9+r/rtVR5zrWYF/v4rNKeP6GMBBWf xyogARAYCcOvzhnRj0LI6uSAoGmIWgTx+JcuVDtgWHdxDrMwm1V9LGjf5+zWjD91CoB0 dmLn530h1/Xs9+oaGXbk7xBP1eSyhUHPinPG4hT7zQkyCn6Bi6NLLsJbg2tuydTx0EI5 /D8Q== X-Gm-Message-State: AOAM5322xdcHzCTkgrHPXoI23brmH/W2sbfiW9imnDffUCRXKtNQuksC jRi5dUAQuRTxlZNjSeaOxZP5SfttaA0/QcWFnZFZ1hYVNHQ= X-Received: by 2002:a17:907:381:b0:6fe:9ca8:c4b4 with SMTP id ss1-20020a170907038100b006fe9ca8c4b4mr52900857ejb.147.1654033681191; Tue, 31 May 2022 14:48:01 -0700 (PDT) MIME-Version: 1.0 References: <20220531211842.71998-1-andriy.shevchenko@linux.intel.com> <20220531211842.71998-3-andriy.shevchenko@linux.intel.com> In-Reply-To: <20220531211842.71998-3-andriy.shevchenko@linux.intel.com> From: Martin Blumenstingl Date: Tue, 31 May 2022 23:47:50 +0200 Message-ID: Subject: Re: [PATCH v1 3/3] iio: adc: meson_saradc: Use temporary variable for struct device To: Andy Shevchenko Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Neil Armstrong , Kevin Hilman , Jerome Brunet Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Andy, On Tue, May 31, 2022 at 11:18 PM Andy Shevchenko wrote: [...] > @@ -650,11 +648,12 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev, > void __iomem *base) > { > struct meson_sar_adc_priv *priv = iio_priv(indio_dev); > + struct device *idev = &indio_dev->dev; > + struct device *dev = dev->parent; It looks like this should read: struct device *dev = idev->parent; That said, I think this kind of typo is very easy with the current naming schema. It's been a while since I looked at other drivers but maybe the IIO maintainers have some recommendations for us (which would apply to multiple IIO drivers, not just meson_saradc). For example: I am not sure if iio_{err,warn} functions (which take a struct iio_dev pointer) have been proposed/discussed before. I think they could be useful for other drivers as well. Best regards, Martin