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: <1bd6ea1e-a5d7-400b-bed7-d9ff7163e960@kernel.org>
Date: Wed, 11 Dec 2024 17:37:27 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, kw@...ux.com,
 gregkh@...uxfoundation.org, arnd@...db.de, lpieralisi@...nel.org,
 shuah@...nel.org
Cc: kishon@...nel.org, linux-pci@...r.kernel.org,
 linux-kernel@...r.kernel.org, bhelgaas@...gle.com,
 linux-arm-msm@...r.kernel.org, robh@...nel.org,
 linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v3 2/4] misc: pci_endpoint_test: Fix the return value of
 IOCTL

On 12/11/24 5:01 PM, Manivannan Sadhasivam wrote:
>  struct pci_test {
> @@ -52,63 +51,65 @@ static int run_test(struct pci_test *test)
>  		ret = ioctl(fd, PCITEST_BAR, test->barnum);
>  		fprintf(stdout, "BAR%d:\t\t", test->barnum);
>  		if (ret < 0)
> -			fprintf(stdout, "TEST FAILED\n");
> +			fprintf(stdout, "NOT OKAY\n");
>  		else
> -			fprintf(stdout, "%s\n", result[ret]);
> +			fprintf(stdout, "OKAY\n");

Why not simplify as I suggested to avoid all these repetitive (and ugly) "if ()
else" ?


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ