Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7629609yba; Thu, 2 May 2019 13:17:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZWYUjGQ7QqI9Elql4vZ4ugW4bMMEkROlOqNHO8i/wlmBBTqF4IZXe1c9ueEY4G3SoDmJj X-Received: by 2002:a65:51c9:: with SMTP id i9mr6057626pgq.187.1556828248152; Thu, 02 May 2019 13:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556828248; cv=none; d=google.com; s=arc-20160816; b=cQilD46FSTBJ3t/GXS8i5Gvr2YLZE+YS+9ztif1gvpBsgwMUNKnj3DedmyDMV3PcOE VvL8lpYUrLP3dTKqxFno/Feg07TzZui1bHwIpw+Vlf4dTd033B8odNk2V0sInZEP/dP+ T+aWsgcrjwCCRl7rZp2smBB55Sy/cmO4rxulFaqwPUw0vhOpATjfgqroRDIHkduaEUg4 iKu8PByGz4mblsvclXS5Ub79xQcUbG1E5XwP4SGgnjiYOlyUPoeT/wrSpqCfSlMgV3jQ s/d476/y5QKARZv4CnjSwxokvlab+exZKU9EFsceVe+sCG18qP9m037FV79Ab3OhBS+k s/qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=sMAsVX/APD+Avr2eX3YovWgxzS14HVcdvOpD4vJcQWY=; b=lt9ROMHjrtDjIYD1wazdbNqaywHnXanKqSEtRvTRMMwz1kD9Cv7O0hqvFkp4wUMpIp D6JM2KgDzm33j6E2adjHZV10Da3eDW/L5KZfkGPsm9BmttP3sQFrcijcinqsd0Z0/Hje hCBDRaXLwTM88mqv9M2eXmsY9elqZfL1IMjCBstnJahqcj+GZXaYYh4JzNQZXcM3Xe4a SLenqmupKMnr9XiV5xAQF5roO+EW3mEXqsWdvXm6br0XEDZ1ikj9tdEsOUNCOAT5T1C6 EIs6iyy+dhSTgFVSPN8dgDEzTS+PnV9OpOvDVpy+z/PcGXk2GDYaUPkyoAqKLqvb5hCp 5FzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4si97528plb.305.2019.05.02.13.17.12; Thu, 02 May 2019 13:17:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726341AbfEBUP6 (ORCPT + 99 others); Thu, 2 May 2019 16:15:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42372 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbfEBUP6 (ORCPT ); Thu, 2 May 2019 16:15:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id EEC07263A23 Received: by earth.universe (Postfix, from userid 1000) id 908E33C0D1B; Thu, 2 May 2019 22:15:54 +0200 (CEST) Date: Thu, 2 May 2019 22:15:54 +0200 From: Sebastian Reichel To: Phong Tran Cc: ndesaulniers@google.com, natechancellor@gmail.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] power: supply: core: fix clang -Wunsequenced Message-ID: <20190502201554.qvuunxprepxhvzbm@earth.universe> References: <20190502012704.12505-1-tranmanphong@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fryypaezrgitn536" Content-Disposition: inline In-Reply-To: <20190502012704.12505-1-tranmanphong@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fryypaezrgitn536 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, May 02, 2019 at 08:27:06AM +0700, Phong Tran wrote: > The increment operator of pointer in be32_to_cpu() is not explicitly. > It made the warning from clang: >=20 > drivers/power/supply/power_supply_core.c:674:36: error: multiple > unsequenced modifications to 'list' [-Werror,-Wunsequenced] > drivers/power/supply/power_supply_core.c:675:41: error: multiple > unsequenced modifications to 'list' [-Werror,-Wunsequenced] >=20 > Link: https://github.com/ClangBuiltLinux/linux/issues/460 >=20 > Signed-off-by: Phong Tran > --- Thanks, queued to power-supply's for-next branch. -- Sebastian > drivers/power/supply/power_supply_core.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/sup= ply/power_supply_core.c > index c917a8b43b2b..7cc6f5fac0d0 100644 > --- a/drivers/power/supply/power_supply_core.c > +++ b/drivers/power/supply/power_supply_core.c > @@ -665,8 +665,10 @@ int power_supply_get_battery_info(struct power_suppl= y *psy, > } > =20 > for (i =3D 0; i < tab_len; i++) { > - table[i].ocv =3D be32_to_cpu(*list++); > - table[i].capacity =3D be32_to_cpu(*list++); > + table[i].ocv =3D be32_to_cpu(*list); > + list++; > + table[i].capacity =3D be32_to_cpu(*list); > + list++; > } > } > =20 > --=20 > 2.21.0 >=20 --fryypaezrgitn536 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlzLT/IACgkQ2O7X88g7 +ppo8g//S3Llctg446+FE7ffQ++R08/UBFsJPdxlsna5xwxbicUoYy2AC1vbXEai 6N4ptFzxGtatqXBD8XqweeMIERjrIL9O0mS35mO3eQ74AUEMkTfyCacOkx1OsAq/ 9nRj/BxHtHwYRRI6Uv3RTIw/wi58HTS83DhIPBnumMKSawdq1oRqgRKsOJrlsVum EU1jB1Cq7m68mzg2Ypzh0JwJVEWRnxRBKmZn9zKvYB3kT0yL/5MLDjyF0HbzjZDC dycMrKNSuu4G03278veQWH/k0mvejiYzKBQoEyCYuPkJ7SXiTXyin6aPDY+3vfTK DqtSJAvm5UZ5cM5YU74hpIs/zuhLl7ORx3hR8Idx7KuXBT/Ls4LQCCz4lRJLtEuP tPGqHoeJQxpjQlFIgLAgplAHJf70zDrjpJ2ZO2n9dZShkM1lGPMvLidazVAXWz70 xD9rkl8aW5lgqm+ccKvCOKl5GQf+3EJYmUQXIlxfGqUa3uEXqVDGMULgghDuy24B dzinRcFgk4MiVBGWBH1klrCHcO1g8BgkdBLftiz8UwqwfAXlXZQqkmcWgzRTCr8+ gxNzt4o4yPu+9549VeVbrYq7MoPDZPlLeIR+0/tn5jW/aFW1qo08VhQHbNTGKdFL OULL6mDn5NlQkjumD2LaEs0XCH+xPW6VMeKwjRg/oQCrEnc3klg= =0jkf -----END PGP SIGNATURE----- --fryypaezrgitn536--