* Re: [SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver
[not found] <20130903233716.5333B660D6B@gitolite.kernel.org>
@ 2013-09-04 23:27 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2013-09-04 23:27 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: linux-scsi, bgrove
> +struct esas2r_adapter {
> + struct esas2r_target targetdb[ESAS2R_MAX_TARGETS];
> + struct esas2r_target *targetdb_end;
...
> + u8 fw_coredump_buff[ESAS2R_FWCOREDUMP_SZ];
> +void esas2r_reset_chip(struct esas2r_adapter *a)
> +{
> + if (!esas2r_is_adapter_present(a))
> + return;
> +
> + /*
> + * Before we reset the chip, save off the VDA core dump. The VDA core
> + * dump is located in the upper 512KB of the onchip SRAM. Make sure
> + * to not overwrite a previous crash that was saved.
> + */
> + if ((a->flags2 & AF2_COREDUMP_AVAIL)
> + && !(a->flags2 & AF2_COREDUMP_SAVED)
> + && a->fw_coredump_buff) {
> + esas2r_read_mem_block(a,
> + a->fw_coredump_buff,
> + MW_DATA_ADDR_SRAM + 0x80000,
> + ESAS2R_FWCOREDUMP_SZ);
Comparing an array (fw_coredump_buff) to null probably isn't what you intended here.
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
* re: [SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver
@ 2020-04-10 14:09 Colin Ian King
0 siblings, 0 replies; 2+ messages in thread
From: Colin Ian King @ 2020-04-10 14:09 UTC (permalink / raw)
To: Bradley Grove, James E.J. Bottomley, Martin K. Petersen,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Hi,
Static analysis wit Coverity has found an issue in the following commit:
commit 26780d9e12edf45c0b98315de272b1feff5a8e93
Author: Bradley Grove <bgrove@attotech.com>
Date: Fri Aug 23 10:35:45 2013 -0400
[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter
Driver
The issue is in function write_fs in drivers/scsi/esas2r/esas2r_main.c
as follows:
101 int result = 0;
102
103 result = esas2r_write_fs(a, buf, off, count);
104
105 if (result < 0)
Unused value (UNUSED_VALUE) assigned_value: Assigning value 0 to result
here, but that stored value is not used.
106 result = 0;
107
108 return length;
I'm not sure what the intention was for this. Was length meant to be
assigned to 0 rather than result? Or is the result < 0 check just
unnecessary code?
Colin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-10 14:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20130903233716.5333B660D6B@gitolite.kernel.org>
2013-09-04 23:27 ` [SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver Dave Jones
2020-04-10 14:09 Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox