From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2504FC001B0 for ; Wed, 9 Aug 2023 01:39:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F414886789; Wed, 9 Aug 2023 03:39:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="tfv5Qxvc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D5E63867D2; Wed, 9 Aug 2023 03:39:35 +0200 (CEST) Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C87428675B for ; Wed, 9 Aug 2023 03:39:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-583f036d50bso72455487b3.3 for ; Tue, 08 Aug 2023 18:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1691545172; x=1692149972; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uh997Ws/kZq0jLTA2qJb0SYRYksvUz0UZIQ5jn3KMLc=; b=tfv5QxvcW3DDJ06HJR9SNIUdswsnyz7CdNjbpMxXmOVCOlc2u3c/vTE+SgrYV0E+TV ahq4IbH514gtIAusXZ/n5lpPn+6p4jgdTJn1nu21OGbFpqCZwbfzN7frZLFH6Ll8JJxx Og1ROIv6vslmlb8wklJqMzMOD+oBqOeDAHGZw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691545172; x=1692149972; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uh997Ws/kZq0jLTA2qJb0SYRYksvUz0UZIQ5jn3KMLc=; b=eCDZ9z987zZj6eoqgHLfIFrUKdnfSJrQ6qmTLceArSY9GB0m/J19UKA8hSPLAdPsVT a1jplyHwTWl/3lKwLIJVGOHhQlLLcF/pl07UPguffj80qxmU/G5OjrO7+xDURH0nzRr1 35eicFRK68ZMRArj7FvIFKhQZtq4PpHrkKbd6GFBugJL9fuG5/54aPhNWt8jI31yXaQ9 NgBHgWxn6PIzcYtvbK3ss1TT4ngiG7oXbLXyhpiV2A5Bm5C32UxFn1Ihd0zNM1/AyPi2 S2BtvqkPGXKstaZlQxdqYC1MO7jt4fx3Ah37FD/4zyswXMPr2SBp+IHfTuS0MbpeuvjH af1g== X-Gm-Message-State: AOJu0YyF5Goai/9u4Y4g+827YUQFSnTwK4zK5WQeMVDn1Qk7GmCq7KlF 9l99kvJKaXtHZoeyhLdViiT4fg== X-Google-Smtp-Source: AGHT+IHH5iz4C7t51EHmnBSDKNSiTbpSDqySP9836pD9MatEO2BVbmIOunXXaFS6cMG0KGUrcg3d1A== X-Received: by 2002:a0d:f403:0:b0:573:a763:5876 with SMTP id d3-20020a0df403000000b00573a7635876mr1567072ywf.51.1691545172385; Tue, 08 Aug 2023 18:39:32 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-c8dd-d0aa-4930-890d.res6.spectrum.com. [2603:6081:7b00:6400:c8dd:d0aa:4930:890d]) by smtp.gmail.com with ESMTPSA id g11-20020a0ddd0b000000b0058451237d7dsm3694950ywe.119.2023.08.08.18.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 18:39:31 -0700 (PDT) Date: Tue, 8 Aug 2023 21:39:30 -0400 From: Tom Rini To: Dan Carpenter Cc: Anatolij Gustschin , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH] video: Add parentheses around VNBYTES() macro Message-ID: <20230809013930.GR3630934@bill-the-cat> References: <1628fc37-2c9f-493d-82c2-9bf225f2645a@moroto.mountain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SXEy4CRSvXXvDElj" Content-Disposition: inline In-Reply-To: <1628fc37-2c9f-493d-82c2-9bf225f2645a@moroto.mountain> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --SXEy4CRSvXXvDElj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 26, 2023 at 09:54:08AM +0300, Dan Carpenter wrote: > The VNBYTES() macro needs to have parentheses to prevent some (harmless) > macro expansion bugs. The VNBYTES() macro is used like this: >=20 > VID_TO_PIXEL(x) * VNBYTES(vid_priv->bpix) >=20 > The * operation is done before the / operation. It still ends up with > the same results, but it's not ideal. >=20 > Signed-off-by: Dan Carpenter > Reviewed-by: Simon Glass In that this seems correct: Applied to u-boot/next, thanks! But I want to note that with gcc-13.1 (and binutils 2.40) or more specifically the kernel.org arm/aarch64/etc toolchains, this causes the generated code to change: aarch64: (for 1/1 boards) all +8.0 text +8.0 bananapi-m5 : all +8 text +8 u-boot: add: 0/0, grow: 1/0 bytes: 8/0 (8) function old new d= elta video_post_probe 248 256 = +8 So I don't know that this was a harmless bug. --=20 Tom --SXEy4CRSvXXvDElj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTS7k8ACgkQFHw5/5Y0 tyz7ogwAt/Vw7Pqc79GUEyWZor85bfNIaal8orufiLm40zGJUXQYOg+7CaVIXL6b EJkQz+D3wR61nLH+aOSJd2vDmFcFokgXlB0ibhTewIdkLNdDuIdtuypfaSf5k8uu 1pKF0JUeHID6MV65VwRBR/MrjUddNycsk6sBUj4nWF4cPsTdeswso5fgNmzFiy+k 7UjRnzQORvE5WHjDNXsv81i9xAMkwewIXcyoYsJC2xPH5Or5w2ZkEqSdh9rMYR1R en6DflCSUsUmouE/otRFJUe5lScR0pk6lHYxa7n93uJm3MuiRUBBe9OrVNP8VrCa 1ZgQvXgz9OoAuq60IY6NBD8Agq5bAdOoeLOaHjpq9eiq6sW9tjacBUbc8jkaSMvY FGgntaeVbSCiFJShMUSFJOxmEM5DbwDD3mMaPwCz1XIcauFL+Su9Ct02BWLXa8DX CMkd1P7shl9viVZtFkDtu5Tt6KTSDcz08guCqBAk//nlkTsq8c4m6WOVgcaXDUPq CdRyBy2h =Nfez -----END PGP SIGNATURE----- --SXEy4CRSvXXvDElj--