Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3820100rdh; Fri, 29 Sep 2023 03:25:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/nEHT6H9peihOP0JdlHG4bFkx3R2BakENpf/6XGJAARwevhyJB6fo3dJ9MQuFFVf6qdJe X-Received: by 2002:a05:6e02:1c25:b0:34f:d822:baab with SMTP id m5-20020a056e021c2500b0034fd822baabmr4119114ilh.12.1695983155180; Fri, 29 Sep 2023 03:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695983155; cv=none; d=google.com; s=arc-20160816; b=oWHHJmBl971pWt3gxqFrEHqKhl/yGZmUF9It78qseYAmfxcjVzCc90JLfpO9vKtuKC 94/KDS0zRtrPUERW9oeKhw1su8olPFLN4mKZC4lRjmX5E78TveY+FdxzxW+LK292Aflj Zy4TeCYKjNV5XO6H7JtEt+3LVe1QuS56hk3mcdc6ZTqyRyCzzhvMH3e4SdFvt9NfYFcv b1jj4NDHE4bltL1GqfvbuHYwjukFfEEg3QDW4yQ6AJC8iYcElRsIbqeNyaCo8Sf3XVWZ JwJW9ejpAo0o18kFnR72qyNg6Octw2tItatuPNAxDlIGSWeC8mJzPt8ko0OGbgu+g0Ot xW/A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=DkkuEPwTYt8GbMH8iZ1BaKj+qxzzGPRjBR6slJVTr28=; fh=FqIoEcoufzZ5a0l+P2Q6G4k4+tPcCtT87q1hz4gi9iE=; b=SYCAvmMGD+mNViWGANhNvZ7tB6iEJ+u5rpUpRnYiEV20kE9ENcNxkhvN/CLdFx8VDK xrLwUt0PkhtjMz09XQub9uv++c218H4QK1X90nKOEsAtzNrHjNa1a+SUsMTHk4GGTZZl AQUiv//3bY1uxYyga+bLaoLRx84Xil16lv3dLwkaSAwrXmbd3eRzYqYDxFDEBMueXU8K g0Nz27i//LdniGKgPRDsv/HLenfHZoOUTXRrj5vUP+gUsSkTbMbqFQiKEUTo57nDiD4Y y9vsj5NYe38YK85U2pytPFNGPZNj3+g0osUOUbIVG2ArEqk+CALpHPyGPmMeCD94b91S cIjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HTpXzlSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id p24-20020a637418000000b00584a7863503si10326097pgc.372.2023.09.29.03.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 03:25:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HTpXzlSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id AC2BE801CBDA; Fri, 29 Sep 2023 03:18:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232786AbjI2KR5 (ORCPT + 99 others); Fri, 29 Sep 2023 06:17:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233087AbjI2KRt (ORCPT ); Fri, 29 Sep 2023 06:17:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F30ECCFB; Fri, 29 Sep 2023 03:17:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A0C1C433C7; Fri, 29 Sep 2023 10:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695982660; bh=Fi+IDHGlBgmNRYu1rK859S59T3doLUrBZChLlDSK6B4=; h=From:To:Cc:Subject:Date:From; b=HTpXzlSV1r3+kMFhGBJEbYO0Kx/5XXFGf7QJcGdXmb8luEww4sON51bn8Bv8kSDiP 3pRXSVPdnopll4AxB9MLiD2lVogHCm0JoezvpTGiy0A645WHLH6o2O9TsYKfF4WmTj VfAsI01gYSB/yYy6TFtVvfN6+AW0If6RoZhBgZkxnateA5hrGPpB0i99ukvmJq1Kks CXSHfjmO1q1Z3errqrDbYxnaYuFon14ZCICGYX+dzbQABtdnYf9iPLJq6VrtfeuEuT v8yFYvBzri+yMDc9i8+dW9cwL+R/Nn0rODKVdLuCGjnZdvUIin0DKaVeeq4pJLJwBO 4k5zhc1vd2qYg== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qmAZ1-0005GE-1y; Fri, 29 Sep 2023 12:17:39 +0200 From: Johan Hovold To: Sebastian Reichel Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH] power: supply: qcom_battmgr: fix enable request endianness Date: Fri, 29 Sep 2023 12:16:49 +0200 Message-ID: <20230929101649.20206-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 29 Sep 2023 03:18:09 -0700 (PDT) Add the missing endianness conversion when sending the enable request so that the driver will work also on a hypothetical big-endian machine. This issue was reported by sparse. Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply") Cc: stable@vger.kernel.org # 6.3 Cc: Bjorn Andersson Signed-off-by: Johan Hovold --- drivers/power/supply/qcom_battmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c index de77df97b3a4..6ec71276bb70 100644 --- a/drivers/power/supply/qcom_battmgr.c +++ b/drivers/power/supply/qcom_battmgr.c @@ -1282,9 +1282,9 @@ static void qcom_battmgr_enable_worker(struct work_struct *work) { struct qcom_battmgr *battmgr = container_of(work, struct qcom_battmgr, enable_work); struct qcom_battmgr_enable_request req = { - .hdr.owner = PMIC_GLINK_OWNER_BATTMGR, - .hdr.type = PMIC_GLINK_NOTIFY, - .hdr.opcode = BATTMGR_REQUEST_NOTIFICATION, + .hdr.owner = cpu_to_le32(PMIC_GLINK_OWNER_BATTMGR), + .hdr.type = cpu_to_le32(PMIC_GLINK_NOTIFY), + .hdr.opcode = cpu_to_le32(BATTMGR_REQUEST_NOTIFICATION), }; int ret; -- 2.41.0