From patchwork Sat Jun 18 00:13:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Hauser X-Patchwork-Id: 12886137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFD2BCCA479 for ; Sat, 18 Jun 2022 00:14:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237824AbiFRAOz (ORCPT ); Fri, 17 Jun 2022 20:14:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237773AbiFRAOz (ORCPT ); Fri, 17 Jun 2022 20:14:55 -0400 Received: from sonic306-21.consmr.mail.ir2.yahoo.com (sonic306-21.consmr.mail.ir2.yahoo.com [77.238.176.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E55214D37 for ; Fri, 17 Jun 2022 17:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1655511292; bh=QafQc4ZMyctCnOKdCtBnq0f/dxsC+4Cf+E3CVMEn2HA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=NtmOtP/KVm1GfNsLn+TzLvUBLC9OIsXqyNmFQg2S17T6pjM2kpAyJAnrOF+CqSAE43Lq+CE1lqnfAI/CZ+5VNw6iHEbz1dS4q0SJat6GWA6HyfYREW+0yKda8EbI3LHEiq5a8lCIddROXhjfviwt6mKbbbLz+YqKyXUCuz9UrOiSMSYephZOYMrOxC6llQ99tuwt6MBToRXHbcsP++Af7yHdVsjEp4XyfeQ7XBu3DBuHkBzwN6/7xdzjq+lEVqW2GxOSTxURCOKfaUnR+6X09edwiivLFwus7xiFaSh6b6DLr1eqV285Jemt1tbyYAbUzE+ndnprO1Y1OuDcPV5NHA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1655511292; bh=q4KF4LnLCgGczavQeg4kZbz0UBI8FlurD6Ewv0UfQpp=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=mU8ML18TUvIcEbxLeg6lhWilNAMh4IilsuluRLt0mV6NHnvOy3d+w0Chrohgy2Gv3GqMZaznOr6ZNnuS7r8rGATITX/6CHKIfyuB/s4K4YKCdN32Fe1z/BpJMeEnVvranVM6C+N4FX/aXfeMTmH+h9bwgP4Vo0W3OWKWUqxZeAZeT/bYWqjAq3mmwEYshz83wxl0XdW/LfRFgbGRuLzYvfmjGyND/2XhAolR+UNjSs6HH7QLlnCE8aPA416uzXulsHN4roJAMor74P4X5CQdr7cZPScU4cxH+UOsWzd/DcHdt6f7FDp/uLC5ZdjqaXoCEhbCxl7HVE1DSZdmI88xSw== X-YMail-OSG: QXckt8AVM1k5Tq_SBboGxY9z6NuiwLc2mrsX0ttdu8DV6_DMtVzI73JSwDy4wmB oEkvbFQtdNqdZy3gRA.2F3JdvXKGvUSTmKtub7_LNL54xfBtUhZ0b0OCh5t0Smkq9cktMIkvFpan 6t5gj61EvPo2yM9wwkxiT4HJ5kNO_avwN15LXxp_IgP_6XC6XNmLel_9g41nT4mzDLxn4wyj9kT2 rj7STNnhz_E5CJ7f6DuKA4zf4a5es9gwFtpyQs0OCNVPrC0GPIDMoqQjqKKSc2vKlLCedw_hWGHC GWK6NlpndxH01403VclPg2r5j6zG0rNJEZY3axFLQfuSdXqrV14gLHVRZm01UCLsdOX8gYqNg32b _bWwdAlMVPm_OLyUs7bjc5z3eIulVGBDCpRJqnjTjHwNOS5HWBCoP6WyyGbvr6RKRDxZbYiHyGNf hMWNaNPkEKKx.JLN36hnaftCrYnH5TOh0vuvuzZF0C5Uv6Jeo8C_4YzpQVsId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jO4BtiKIyjhGet4TFkK 6kSiDYIwZpAZv5.6R3v3jURSssls.X2PoaHjcIuV5Rfti92pFK.Ma4SgCxXb0TqIDCYuHtnMcILg h4SvYa.tALvfKm0FsUdIn.KgteGQYBLmePlP1Wt418WpZ8rQH8g4JmOqJ6fOk4Y71ibgDRNLPLVA czjqyd0.OZ5b6mWfZ4lJCXmFQ6n71D4W4V6SVfp1TU0lsHc47bTkHx8A5D0tunyiU6mLY4oBkkXF KY1cFdhVEqzp4lewN5w6p4HGslAvgUsAPuEB7h8nKj_tcSrcjpBvv9CGZ7vxNB2VxEQ5pj39z.aR sriOWrInitQSNpgoxjWthxyCWFJ9EZrKjS.OKBtyViAuCGd_vz2EvVsSMx7zWL.53z5MuIwKyCTD yNXnMhTevGYvUb3UGtShpsLg83GZXfITAl54Fwis.fOJ.c69sbnU2eLrmdqZHRRhtJATSNzja0Tj E8yLvXCJgc8XvyHfnrCJKK_Irkto9az9FYABdNNrW.vBn14QWOtH_eAWPoQRtsJm.L6zEGn68muP Ul15Nz0L0wreeAFOQXNJwUVqXQ_geS0BSeApIRx_LV_qn0ywaZPnbMsSMRDyosjxp5mv6Xu0deUZ RqNTnOxZWJB7dLr9qFqW2rKt69ijafUxtp145BIW3SSc8k4OzKR.SIcQqoM.om8HPsMipAK3iTxk FOs8i3DpslxCgTSVV96XRLX5oZCWzELqMAapr9E46jvXAr_zrG90zuc8IOXZdPAimPtTpIprUmyk yUW.5bsvLa.XQIftnYA-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Sat, 18 Jun 2022 00:14:52 +0000 Received: by hermes--canary-production-ir2-c9bf9d9bc-74fwm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8b08f14069c990c2ed22165f3e3da032; Sat, 18 Jun 2022 00:14:50 +0000 (UTC) From: Jakob Hauser To: Jonathan Cameron Cc: Lars-Peter Clausen , Linus Walleij , Andy Shevchenko , Hans de Goede , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH v3 1/8] iio: magnetometer: yas530: Change data type of hard_offsets to signed Date: Sat, 18 Jun 2022 02:13:09 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org The "hard_offsets" are currently unsigned u8 but they should be signed as they can get negative. They are signed in function yas5xx_meaure_offsets() and in the Yamaha drivers [1][2]. [1] https://github.com/NovaFusion/android_kernel_samsung_golden/blob/cm-12.1/drivers/sensor/compass/yas.h#L156 [2] https://github.com/msm8916-mainline/android_kernel_qcom_msm8916/blob/GT-I9195I/drivers/iio/magnetometer/yas_mag_drv-yas532.c#L91 Fixes: de8860b1ed47 ("iio: magnetometer: Add driver for Yamaha YAS530") Cc: Linus Walleij Signed-off-by: Jakob Hauser Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko --- drivers/iio/magnetometer/yamaha-yas530.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c index b2bc637150bf..40192aa46b04 100644 --- a/drivers/iio/magnetometer/yamaha-yas530.c +++ b/drivers/iio/magnetometer/yamaha-yas530.c @@ -132,7 +132,7 @@ struct yas5xx { unsigned int version; char name[16]; struct yas5xx_calibration calibration; - u8 hard_offsets[3]; + s8 hard_offsets[3]; struct iio_mount_matrix orientation; struct regmap *map; struct regulator_bulk_data regs[2];