From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CF10C43331 for ; Sat, 28 Mar 2020 15:21:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D81A20748 for ; Sat, 28 Mar 2020 15:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585408899; bh=JsWNCW+E/FEvlrY/8s2LDzeUVPhR7r4MU73MoQkf4Hc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=fKLB9k4GvRrYUFGoNvPomiPeyPQ1gfLOYbK/ZBiziYjKQRXrNMoi/zsDBNu1llt3+ lMp42DN9k9ECRPNOm1aEvtgN5R1aZQOFJu1WmO4hhXr34JB2N1hU6ZXKDjK0u75qrU YVKPMZYIdQaIAq1M2r9OFj2qu+kjCNrU1wOXn4q8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbgC1PVi (ORCPT ); Sat, 28 Mar 2020 11:21:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:36312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgC1PVi (ORCPT ); Sat, 28 Mar 2020 11:21:38 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ABE2420716; Sat, 28 Mar 2020 15:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585408897; bh=JsWNCW+E/FEvlrY/8s2LDzeUVPhR7r4MU73MoQkf4Hc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JrB75c10YUkNmTzgLlSKKkmgW7nFIABie5ie0+dNbll+cbTahzAdsCleVbwpYWsLm 7KuGqI88r9KwJw+mbFx8KcZ+oC4tiMnqN/UoOQ3YpK/7EQJOJJF51bhXPBmUUQKrAE Lbu7e8jSoUTP0TEoiGfnFTHqlg4TYcqIsMfVQw4E= Date: Sat, 28 Mar 2020 15:21:33 +0000 From: Jonathan Cameron To: Eugene Zalkonnikov Cc: Hartmut Knaack , Lars-Peter Clausen , "development@norphonic.com" , "linux-iio@vger.kernel.org" Subject: Re: [PATCH v6 1/2] Driver for TI HDC20x0 humidity and temperature sensors Message-ID: <20200328152133.09095af5@archlinux> In-Reply-To: References: <84EE5291-D8C4-40D3-A75C-92362BF9DF8B@norphonic.com> <20200322161722.0feb8da8@archlinux> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, 23 Mar 2020 14:39:34 +0000 Eugene Zalkonnikov wrote: > Hi Jonathan, >=20 > > On 22 Mar 2020, at 17:17, Jonathan Cameron wrote: =20 > >> +static int hdc2010_write_raw(struct iio_dev *indio_dev, > >> + struct iio_chan_spec const *chan, > >> + int val, int val2, long mask) > >> +{ > >> + struct hdc2010_data *data =3D iio_priv(indio_dev); > >> + int new, ret =3D -EINVAL; =20 > >=20 > > Unless I'm half asleep (which is possible :) ret is always > > written below before being used. Hence this init isn't needed. > > =20 > I suspect it=E2=80=99s a vestige from before all stylistic rewrites in re= cent patches.=20 > Same for the shared returns. Will change that. >=20 > >> + > >> + indio_dev->dev.parent =3D &client->dev; > >> + indio_dev->name =3D dev_name(&client->dev); =20 > >=20 > > That should be the part number. IIRC that's not what you'll get > > from dev_name called on the i2c device. Note we let a few of > > these in in the past and are now stuck with them...=20 > > =20 > My access to actual hw is limited now, so to reduce the iterations here: = what > is going to be a suitable device name? Would =E2=80=9Chdc20x0=E2=80=9D do= ? =E2=80=9Chdc2010=E2=80=9D? Should match the part so hdc2010 or hdc2080 as appropriate. No wild cards. >=20 >=20 > Regards, > Eugene.