From patchwork Wed Oct 19 08:29:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214969wrs; Wed, 19 Oct 2022 02:14:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5tp4vvmX1Nt/cElcv3fA3GmsTLqmSb4LfekRUErXhBjPpz3xSHmkJdil3Qu3srXigdswqH X-Received: by 2002:a17:907:9816:b0:787:4350:3a19 with SMTP id ji22-20020a170907981600b0078743503a19mr5530204ejc.627.1666170855311; Wed, 19 Oct 2022 02:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170855; cv=none; d=google.com; s=arc-20160816; b=NNQZNrVOVmXWMXGxmrtf6g3BKireMdsHmmneZV5XAwzvXP7QZ3Uyv0H9SuFRv283Xp nKErLadPQzm6PvOCQg6rUqPOcawMhD3A2pjYKnnHBtyByL2W6n4iXJ6xAM7unesuC7fQ PMDdPVXNw1afC2kBYSHzDtbzjxSUI/enoAsuXxE4zvjizIim4xRgT0iv4KA4Ta+BU/wz T8HgK+AAFsGKmdi2AjCpGBHtAJCKRyHUHb15Fn9kuJJeFu0gXVeRMZtPgLSCGDIZ8cGg Kv/FygTINwcemD46I6bQqDFhHaPPqniYx/h7i6ZjllwbXHqiTecdwUe8uUnUAtxL4gZS mXqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hQPRO9t9lGXC58fFDvsEdi4BnJVOkmKk0E9tgfX8bFw=; b=KoL3QnM7PBFBTVMExEBEyqvwFSVTtu0AXdYY0wMiga+dSEVgHTdOow6wxwZxG/w78j wcQ+gd83tutsvOULA6uuJVk+5/dwWRGjWWwKErgcdxn0CGhVXDI+D3N/C175wSHLVJjf 64rgpLFw3s3HT5BBSWbxaLCsPzdLX9You7gzvSIrRLkCl2eFp1UjmVvnAdfXecEExyqK kdQrBB5cSE2kUTCtizoMDkhutffSQ1jVZwPSb4C632maFg3GzPjo1QhG18hTEyNU2Yak /AwI3qo8HoFHOTFKEsbTB3iHuEfNbM1qld4bUNrX2rQ76/oogcolzyon8gVpq2dsfdU1 /28A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r5Rsczci; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh40-20020a1709076ea800b0078d288c1047si14289406ejc.841.2022.10.19.02.13.50; Wed, 19 Oct 2022 02:14:15 -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=@linuxfoundation.org header.s=korg header.b=r5Rsczci; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232973AbiJSJMx (ORCPT + 99 others); Wed, 19 Oct 2022 05:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232387AbiJSJH6 (ORCPT ); Wed, 19 Oct 2022 05:07:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3E771ADBD; Wed, 19 Oct 2022 02:00:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 59AD5617FB; Wed, 19 Oct 2022 08:58:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CAC5C433C1; Wed, 19 Oct 2022 08:58:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169932; bh=9PXW0jD/9VCb+BHX7rIhISiFRilpbAWDGc1l+7xT2L4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r5Rsczci9CaitFDER9yY5r1Ma62xlL2GGOzWn5gd0yIAuR9t5zcUMLONduQ1XtN2Z 6k43CbhY9KypdBLg/ax1voZ/A5aDlaYnaDzM/OJyJs0V76Hyai4bWOqTrelVMfef+9 2QsiuL/eIQoVOudjDcKOMEGRIaYr2/fvLkyAAF1U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakob Hauser , Linus Walleij , Andy Shevchenko , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.0 464/862] iio: magnetometer: yas530: Change data type of hard_offsets to signed Date: Wed, 19 Oct 2022 10:29:11 +0200 Message-Id: <20221019083310.493893259@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106770604016963?= X-GMAIL-MSGID: =?utf-8?q?1747106770604016963?= From: Jakob Hauser [ Upstream commit e137fafc8985cf152a4bb6f18ae83ebb06816df1 ] 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") Signed-off-by: Jakob Hauser Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/40f052bf6491457d0c5c0ed4c3534dc6fa251c3c.1660337264.git.jahau@rocketmail.com Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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 aeaa4da6923b..d1f16729c60e 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];