[Qemu-devel] [PATCH v2 0/3] nvram: at24c: fix problems related to "rom-size"

Wolfram Sang posted 3 patches 7 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180319213101.6100-1-wsa+renesas@sang-engineering.com
Test checkpatch failed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test s390x passed
There is a newer version of this series
hw/nvram/eeprom_at24c.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
[Qemu-devel] [PATCH v2 0/3] nvram: at24c: fix problems related to "rom-size"
Posted by Wolfram Sang 7 years, 7 months ago
I used this driver as a template for a custom one. While hacking on my own, I
noticed some problems in this driver, too. This series fixes the first set of
them, related to the "rom-size" parameter. It fixes a segfault.

I think the first patch is clearly suitable for stable. I think the second one,
too, but not as clearly. The third one is a cleanup and not for stable. Still,
I am open for opinions about these thoughts.

Thanks,

   Wolfram

Changes since v1:

* reordered patches according to significance for stable
* use AT24C_ROMSIZE_DEFAULT instead of magic value
* patch 3 doesn't improve the ERR macro anymore but replaces
  it completely with error_report().


Wolfram Sang (3):
  nvram: at24c: prevent segfault by checking "rom-size"
  nvram: at24c: use a sane default for "rom-size"
  nvram: at24c: use standard error reporting

 hw/nvram/eeprom_at24c.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

-- 
2.11.0


Re: [Qemu-devel] [PATCH v2 0/3] nvram: at24c: fix problems related to "rom-size"
Posted by no-reply@patchew.org 7 years, 7 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180319213101.6100-1-wsa+renesas@sang-engineering.com
Subject: [Qemu-devel] [PATCH v2 0/3] nvram: at24c: fix problems related to "rom-size"

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20180319213101.6100-1-wsa+renesas@sang-engineering.com -> patchew/20180319213101.6100-1-wsa+renesas@sang-engineering.com
Switched to a new branch 'test'
002d73a8fa nvram: at24c: use standard error reporting
6c4df3f9e8 nvram: at24c: use a sane default for "rom-size"
22640ea981 nvram: at24c: prevent segfault by checking "rom-size"

=== OUTPUT BEGIN ===
Checking PATCH 1/3: nvram: at24c: prevent segfault by checking "rom-size"...
Checking PATCH 2/3: nvram: at24c: use a sane default for "rom-size"...
Checking PATCH 3/3: nvram: at24c: use standard error reporting...
ERROR: Error messages should not contain newlines
#40: FILE: hw/nvram/eeprom_at24c.c:64:
+                error_report("failed to write backing file\n");

ERROR: Error messages should not contain newlines
#49: FILE: hw/nvram/eeprom_at24c.c:125:
+        error_report("rom-size not allowed to be 0\n");

ERROR: Error messages should not contain newlines
#58: FILE: hw/nvram/eeprom_at24c.c:135:
+            error_report("Backing file size %lu != %u\n",

ERROR: Error messages should not contain newlines
#68: FILE: hw/nvram/eeprom_at24c.c:143:
+            error_report("Backing file incorrect permission\n");

ERROR: Error messages should not contain newlines
#78: FILE: hw/nvram/eeprom_at24c.c:165:
+            error_report("Failed initial sync with backing file\n");

total: 5 errors, 0 warnings, 59 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org