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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham 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 4E185C4363A for ; Mon, 21 Sep 2020 18:06:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0184E21D91 for ; Mon, 21 Sep 2020 18:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600711592; bh=beRQspo4pEm2yDYU/CJTnj6WANeVzFLoFcVOy7uOyIA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=IKt/j9d2lIVJjfysYWpRZzSGG1Ka+V058wWFNCeaxJEy5yJ+Y6khVe2T5z0wfoGsH 2dYRvH+2C54a2ymcNDi/2Us+z51NLufhXXY5+vX7uRjb5gLD22GP7yLtb/Lo0oKU3H 2AuproiWVcjqJ4+3Qhv6hRNpqIzKEKhqvvWp2yQA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727196AbgIUSGb (ORCPT ); Mon, 21 Sep 2020 14:06:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:56326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbgIUSGb (ORCPT ); Mon, 21 Sep 2020 14:06:31 -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 37186206FB; Mon, 21 Sep 2020 18:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600711590; bh=beRQspo4pEm2yDYU/CJTnj6WANeVzFLoFcVOy7uOyIA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=htqhNwYbfBJSG6nzayGs4O2BNvCjuim8K+QSep+HUS5AFfXQfmU4i1LpUimI+TKu+ njtqTPjaW8bp3qFKYbo00J+ckraSPwPA649XjA9svD5A0rKpazLl0nfrOt+ZxCqMqm OEqFOn+flk3DstojMEq++4u3/WGea8oK0I0zzlp8= Date: Mon, 21 Sep 2020 19:06:27 +0100 From: Jonathan Cameron To: "H. Nikolaus Schaller" Cc: linux-iio@vger.kernel.org, Jonathan Cameron Subject: Re: [PATCH] iio:magn:hmc5843: Fix passing true where iio_shared_by enum required. Message-ID: <20200921190627.68b83b6e@archlinux> In-Reply-To: References: <20200913112546.715624-1-jic23@kernel.org> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sun, 20 Sep 2020 19:12:47 +0200 "H. Nikolaus Schaller" wrote: > > Am 13.09.2020 um 13:25 schrieb Jonathan Cameron : > > > > From: Jonathan Cameron > > > > So it's obvious that the code is wrong in passing true, but I'm assuming > > that will actually evaluate to 1 and hence IIO_SHARED_BY_TYPE. > > The documentation however has this attribute as IIO_SHARED_BY_ALL. > > My current assumption is the documentation is wrong. > > If anyone knows otherwise please shout out! > > > > Signed-off-by: Jonathan Cameron > > Fixes: 7247645f6865 ("iio: hmc5843: Move hmc5843 out of staging") > > Cc: H. Nikolaus Schaller > > Tested-by: H. Nikolaus Schaller > > on GTA04 (omap3-gta04.dtsi). Thanks, that's great. Added the tag and re-pushed as testing for the autobuilders to work their magic. Thanks, Jonathan > > > --- > > drivers/iio/magnetometer/hmc5843_core.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c > > index 1474ba63babe..780faea61d82 100644 > > --- a/drivers/iio/magnetometer/hmc5843_core.c > > +++ b/drivers/iio/magnetometer/hmc5843_core.c > > @@ -245,7 +245,7 @@ static const struct iio_enum hmc5843_meas_conf_enum = { > > }; > > > > static const struct iio_chan_spec_ext_info hmc5843_ext_info[] = { > > - IIO_ENUM("meas_conf", true, &hmc5843_meas_conf_enum), > > + IIO_ENUM("meas_conf", IIO_SHARED_BY_TYPE, &hmc5843_meas_conf_enum), > > IIO_ENUM_AVAILABLE("meas_conf", &hmc5843_meas_conf_enum), > > IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix), > > { } > > @@ -259,7 +259,7 @@ static const struct iio_enum hmc5983_meas_conf_enum = { > > }; > > > > static const struct iio_chan_spec_ext_info hmc5983_ext_info[] = { > > - IIO_ENUM("meas_conf", true, &hmc5983_meas_conf_enum), > > + IIO_ENUM("meas_conf", IIO_SHARED_BY_TYPE, &hmc5983_meas_conf_enum), > > IIO_ENUM_AVAILABLE("meas_conf", &hmc5983_meas_conf_enum), > > IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix), > > { } > > -- > > 2.28.0 > > >