lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3sekz8r7z.fsf@t19.piap.pl>
Date: Tue, 20 May 2025 13:19:12 +0200
From: Krzysztof Hałasa <khalasa@...p.pl>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,  Shawn Guo
 <shawnguo@...nel.org>,  Sascha Hauer <s.hauer@...gutronix.de>,
  Pengutronix Kernel Team <kernel@...gutronix.de>,  Fabio Estevam
 <festevam@...il.com>,  linux-media@...r.kernel.org,  imx@...ts.linux.dev,
  linux-arm-kernel@...ts.infradead.org,  linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i.MX8 ISI crossbar: simplify a couple of error messages

Hi Laurent,

Laurent Pinchart <laurent.pinchart@...asonboard.com> writes:

> The goal was indeed to save memory.
>
>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
>> @@ -352,9 +352,8 @@ static int mxc_isi_crossbar_enable_streams(struct v4l2_subdev *sd,
>>                                                sink_streams);
>>               if (ret) {
>>                       dev_err(xbar->isi->dev,
>> -                             "failed to %s streams 0x%llx on '%s':%u: %d\n",
>> -                             "enable", sink_streams, remote_sd->name,
>> -                             remote_pad, ret);
>> +                             "failed to enable streams 0x%llx on '%s':%u: %d\n",
>> +                             sink_streams, remote_sd->name, remote_pad, ret);
>>                       mxc_isi_crossbar_gasket_disable(xbar, sink_pad);
>>                       return ret;
>>               }
>> @@ -392,9 +391,8 @@ static int mxc_isi_crossbar_disable_streams(struct v4l2_subdev *sd,
>>                                                 sink_streams);
>>               if (ret)
>>                       dev_err(xbar->isi->dev,
>> -                             "failed to %s streams 0x%llx on '%s':%u: %d\n",
>> -                             "disable", sink_streams, remote_sd->name,
>> -                             remote_pad, ret);
>> +                             "failed to disable streams 0x%llx on '%s':%u: %d\n",
>> +                             sink_streams, remote_sd->name, remote_pad, ret);

It appears the current code saves (in my default build) 8 bytes of
memory, at the cost of readability and inability to search with grep:

Current:
Name          Size      File off
.text         00000bf4  00000040
.data         00000000  00000c34
.rodata.str1.8 000001b8 00000c38
__jump_table  00000030  00000df0
.rodata       000001b8  00000e20

With patch:
Name          Size      File off
.text         00000bd4  00000040
.data         00000000  00000c14
.rodata.str1.8 000001e0 00000c18
__jump_table  00000030  00000df8
.rodata       000001b8  00000e28

Built as a module it doesn't even save that - the number of pages stays
the same.

Just FYI.
-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ