From patchwork Sat Oct 22 07:24:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1097603wrr; Sat, 22 Oct 2022 01:08:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63ulJ5Z9uOMdHM83u4V4FOheJ+SDMeymBuXdFI1UTkPl6ldDQl4g7g1WbL6gZEuUlppJBy X-Received: by 2002:a05:6a00:2191:b0:56a:fd17:6723 with SMTP id h17-20020a056a00219100b0056afd176723mr6088880pfi.4.1666426095401; Sat, 22 Oct 2022 01:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426095; cv=none; d=google.com; s=arc-20160816; b=I7kOxGYqMnfebJUJDeAiy2EtfHvhiWBZBbp1whlaFMYq94TQZZvbSniKGNCY5jbEF1 i4IyA1sLP8cVIWfIDPK03HES68mKZ8wAtf0I3gX7fPBJ4nRtAWUMhMavyFTCkqgZiAYC C0Ma6w7jiGxlctAf6ohLLoZNVTCIP5vLxdrtgoRDXR6T7QAvYmWH3qMl9oL9yZT2nb4s l57KgfDCgU+Oy+rHVCjwDzxzOBIfo3d9nweLWGidr9p6oMz1bGlwJUjQA6wgmrgyx2dE AzzPP6/bKEfUFzDJCqQicozc7axN0WRiTbV4S9+DRxEBnIPj12ItvfuH3uVmQwRjXyy+ a/rQ== 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=z+PHrGBK/ycuAA1DAeuKjEyTpt59n0MQfKZqu7GKssw=; b=W6Jf3llxrkV5IsHDmSVSaB5oP0FtYT2SLjJhxThifBRWh1q7NWHEQwlCAQNKb4ZtLl vrg4xhZ7mt62swiHoU3QoWq3H9OOlL2O2UDYRoETsd0Ei2vN4UBjW6su23ZM5sgwt+f4 EXQxYKVz2oAO3/A6x2DFOZH1xRs1DuWOymBV2wisSUDl9qLGhI6hCNDriD1P8gAh59+F Bok/IRkl4/ChHYZX4P4f1iNLczahOeIWD1AXezegfZ3b8kh7pbEAPJklmallBj8b7pa6 Bmvm7nxZO16Tm7pkl+j6dkP5bNtwpgV+S7Q3WzEqqvbW8G7TUPjDZBwUHjjZOEgWarj4 RzUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MSnK4u9T; 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 j12-20020a63cf0c000000b00434c05007d5si28001289pgg.845.2022.10.22.01.08.02; Sat, 22 Oct 2022 01:08: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=MSnK4u9T; 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 S232986AbiJVIHt (ORCPT + 99 others); Sat, 22 Oct 2022 04:07:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232763AbiJVIEK (ORCPT ); Sat, 22 Oct 2022 04:04:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 570BA2A4E1A; Sat, 22 Oct 2022 00:51:35 -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 ams.source.kernel.org (Postfix) with ESMTPS id A11A1B82E38; Sat, 22 Oct 2022 07:51:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF419C433D6; Sat, 22 Oct 2022 07:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425066; bh=iBB9h9YvKlo2kBA38TF8vV6C0UBNbRscfhurjMCwveY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MSnK4u9TKNzZbpOdoNGwSHi4Z8qjXJOcLs+J8czEfLzgbNTrvZszU4mSfpBd6fhPO JhRgRl0gRosytHhTDZdcgwo2kvi08zkE2/iH76nsMwTo5EKmzS/nuhEU7466AdWvWo XLJrD7c0SuGSWLI0t5CaWaYQD5ZmVKxk0NLTYQqg= 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 5.19 378/717] iio: magnetometer: yas530: Change data type of hard_offsets to signed Date: Sat, 22 Oct 2022 09:24:17 +0200 Message-Id: <20221022072513.929591657@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374409133102194?= X-GMAIL-MSGID: =?utf-8?q?1747374409133102194?= 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 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];