AW: [RFC v3 04/17] arch_prctl.2: SYNOPSIS: Remove unused includes

2021-03-15 Thread Walter Harms
I have learned the other way around: #include Is a general system header to use that may include the asm/prctrl.h what should never be included by userspace programms. jm2c, re, wh Von: Alejandro Colomar Gesendet: Samstag, 13. März 2021 20:25:14 An:

AW: [PATCH][next] iommu/mediatek: Fix unsigned domid comparison with less than zero

2021-02-09 Thread Walter Harms
I second that ... Having i unsigned violates the rule of "least surprise". If you need it unsigned make it clearly visible, also adding a simple comment may help. jm2c, wh Von: Dan Carpenter Gesendet: Dienstag, 9. Februar 2021 10:19:23 An: Will Deacon

AW: [PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-08 Thread Walter Harms
thx for info Von: Christian König Gesendet: Montag, 8. Februar 2021 13:14:49 An: Walter Harms; Colin King; Alex Deucher; David Airlie; Daniel Vetter; Huang Rui; Junwei Zhang; amd-...@lists.freedesktop.org; dri-de...@lists.freedesktop.org Cc: kernel-janit

AW: [PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-08 Thread Walter Harms
i am curious: what is the win to have a unsigned 64 bit integer in the first place ? re, wh Von: Christian König Gesendet: Montag, 8. Februar 2021 10:17:42 An: Colin King; Alex Deucher; David Airlie; Daniel Vetter; Huang Rui; Junwei Zhang;

AW: [PATCH][next] SFH: fix error return check for -ERESTARTSYS

2020-10-30 Thread Walter Harms
nit picking: i would without "else" to improve readability: if (ret == -ERESTARTSYS) return -ERESTARTSYS; if (ret < 0) return -ETIMEDOUT; return 0; jm2c wh Von: Colin King Gesendet: Freitag, 30.

AW: [PATCH] x86/unwind: remove unneeded initialization

2020-10-29 Thread Walter Harms
this looks like a reimplementation of bsearch() perhaps the maintainer can add a comment why the kernel implementation is not suitable here ? jm2c wh Von: Lukas Bulwahn [lukas.bulw...@gmail.com] Gesendet: Mittwoch, 28. Oktober 2020 13:21 An: Thomas

AW: [PATCH] sched/fair: check for idle core

2020-10-22 Thread Walter Harms
To avoid this #ifdef jungle .. I guess it would be save to search for a governor even ones that are not enabled. and a second thing: can we change the subject please ? jm2c wh Von: Peter Zijlstra [pet...@infradead.org] Gesendet: Donnerstag, 22.

AW: [PATCH] tools: net: traceevent: Fix 'snprintf' return value check in 'tep_filter_strerror'

2020-10-15 Thread Walter Harms
i guess the whole thing can be made more simple we have len and buflen len=strlen(filter->error_buffer); if (len >= buflen ) return -1; strcpy(buf, filter->error_buffer); jm2c, Von: Fedor Tokarev [ftoka...@gmail.com] Gesendet: Donnerstag, 15.

AW: [PATCH] net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs'

2020-10-15 Thread Walter Harms
if xprt->debugfs->d_name.name can be what ever long it is more clever to use kasprintf() the some for link (no idea how many xprt als possible) jm2c wh Von: Fedor Tokarev [ftoka...@gmail.com] Gesendet: Donnerstag, 15. Oktober 2020 15:59 An:

AW: AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-14 Thread Walter Harms
LEN Von: Alejandro Colomar [colomar.6@gmail.com] Gesendet: Freitag, 11. September 2020 21:17 An: Walter Harms; mtk.manpa...@gmail.com Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org Betreff: Re: AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (inst

AW: [PATCH 04/24] eventfd.2: Use 'PRIxN' macros when printing C99 fixed-width integer types

2020-09-11 Thread Walter Harms
I do not think that this is a good idea. An example should be clear and easy to understand. (e.g. with reduced error handling) These C99 macros are over the top for me. jm2c wh Von: linux-man-ow...@vger.kernel.org [linux-man-ow...@vger.kernel.org] im

AW: [PATCH 22/24] membarrier.2: Note that glibc does not provide a wrapper

2020-09-11 Thread Walter Harms
the groff commands are ducument in man 7 groff .nf No filling or adjusting of output-lines. .fi Fill output lines (for me) a typical use is like this: .nf struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec;/* microseconds */ }; .fi In the top

AW: [PATCH 17/24] get_phys_pages.3: Write 'long' instead of 'long int'

2020-09-11 Thread Walter Harms
sys/sysinfo.h:extern long int get_phys_pages (void) for the real world i would say that long int == long but for the same reason i would say what the include says and stay away from discussions. jm2c, wh Von: linux-man-ow...@vger.kernel.org

AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-11 Thread Walter Harms
BUFLEN should be remove completely or stay jm2c wh Von: linux-man-ow...@vger.kernel.org [linux-man-ow...@vger.kernel.org] im Auftrag von Alejandro Colomar [colomar.6@gmail.com] Gesendet: Donnerstag, 10. September 2020 23:13 An:

AW: [PATCH v2] HID: roccat: add bounds checking in kone_sysfs_write_settings()

2020-08-25 Thread Walter Harms
lets hope the maintainer picks that up. re, wh Von: Dan Carpenter [dan.carpen...@oracle.com] Gesendet: Dienstag, 25. August 2020 09:29 An: Walter Harms Cc: Stefan Achatz; Jiri Kosina; Benjamin Tissoires; linux-in...@vger.kernel.org; linux-kernel

AW: [PATCH v2] HID: roccat: add bounds checking in kone_sysfs_write_settings()

2020-08-24 Thread Walter Harms
hello Dan, i notice that you can shorten the line to: (line above checks for count==sizeof(struct kone_settings)) difference = memcmp(settings, >settings, count); nothing special just to shorten the line and make use of count. and just to save one indent level and because its readabel

AW: AW: [PATCH 5/5] Add manpage for fsconfig(2)

2020-08-07 Thread Walter Harms
found it, next i will look for version not varsion Von: David Howells [dhowe...@redhat.com] Gesendet: Freitag, 7. August 2020 18:27 An: Walter Harms Cc: dhowe...@redhat.com; mtk.manpa...@gmail.com; linux-fsde...@vger.kernel.org; christian.brau

AW: [PATCH 5/5] Add manpage for fsconfig(2)

2020-08-07 Thread Walter Harms
hi, thx for you efford, maybe it is obvious but i did not see it .. starting with what kernel version are these features available ? re, wh Von: linux-man-ow...@vger.kernel.org [linux-man-ow...@vger.kernel.org] im Auftrag von David Howells

AW: [PATCH] coresight: cti: Fix error handling in probe

2020-06-12 Thread Walter Harms
Hi Dan, nit picking in cti_pm_release() IMHO this should be done in 2 steps: if (--nr_cti_cpu == 0) -> --nr_cti_cpu ; if ( nr_cti_cpu == 0) the decrement is easy to miss (what i did first). yes, i noticed that it is also in the original code and it is not that important but while you

AW: [PATCH] rtlwifi: rtl8192ee: remove redundant for-loop

2020-05-15 Thread Walter Harms
if someone has same spare time, this driver need a bit more love ... SO far i can see in rtl92ee_phy_iq_calibrate: * IQK_MATRIX_REG_NUM should be used instead 8 hardcoded. * the for-loop in the beginning is obfuscating that it sets simply final_candidate this can be cleaned: reg_e94 =

AW: [PATCH] net: dsa: sja1105: fix speed setting for 10 MBPS

2020-05-01 Thread Walter Harms
IMHO it would be better to use switch case here to improve readability. switch (bmcr & mask) { case BMCR_SPEED1000: speed = SPEED_1000; break; case BMCR_SPEED100: speed = SPEED_100;

Re: [PATCH][next] drivers: thermal: tsens: fix potential integer overflow on multiply

2019-10-22 Thread walter harms
Am 22.10.2019 13:49, schrieb Colin King: > From: Colin Ian King > > Currently a multiply operation is being performed on two int values > and the result is being assigned to a u64, presumably because the > end result is expected to be probably larger than an int. However, > because the

Re: [PATCH] PNP: fix unintended sign extension on left shifts

2019-10-16 Thread walter harms
Am 15.10.2019 18:29, schrieb Rafael J. Wysocki: > On 10/14/2019 3:16 PM, Colin King wrote: >> From: Colin Ian King >> >> Shifting a u8 left will cause the value to be promoted to an integer. If >> the top bit of the u8 is set then the following conversion to a 64 bit >> resource_size_t will

Re: [PATCH] usbip: vhci_hcd indicate failed message

2019-09-15 Thread walter harms
Am 15.09.2019 05:43, schrieb Mao Wenan: > If the return value of vhci_init_attr_group and > sysfs_create_group is non-zero, which mean they failed > to init attr_group and create sysfs group, so it would > better add 'failed' message to indicate that. > > Fixes: 0775a9cbc694 ("usbip: vhci

Re: [PATCH] media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()'

2019-09-13 Thread walter harms
Am 12.09.2019 22:44, schrieb Christophe JAILLET: > The 2nd parameter of 'find_first_zero_bit()' is a number of bits, not of > bytes. So use 'BITS_PER_LONG' instead of 'sizeof(lanes_used)'. > > Fixes: 1fc3b37f34f6 ("media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver") > Signed-off-by:

Re: [PATCH -next] net: mlx5: Kconfig: Fix MLX5_CORE_EN dependencies

2019-08-27 Thread walter harms
Am 27.08.2019 05:12, schrieb Mao Wenan: > When MLX5_CORE_EN=y and PCI_HYPERV_INTERFACE is not set, below errors are > found: > drivers/net/ethernet/mellanox/mlx5/core/en_main.o: In function > `mlx5e_nic_enable': > en_main.c:(.text+0xb649): undefined reference to `mlx5e_hv_vhca_stats_create' >

Re: [PATCH] scsi: mvumi: fix 32 bit shift of a u32 value

2019-08-14 Thread walter harms
Am 13.08.2019 20:01, schrieb Colin King: > From: Colin Ian King > > Currently the top 32 bits of a 64 bit address is being calculated > by shifting a u32 twice by 16 bits and then being cast into a 64 > bit address. Shifting a u32 twice by 16 bits always ends up with > a zero. Fix this by

Re: [PATCH][V2] drivers: thermal: processor_thermal_device: fix missing bitwise-or operators

2019-07-29 Thread walter harms
Am 29.07.2019 14:03, schrieb Colin King: > From: Colin Ian King > > The variable val is having the top 8 bits cleared and then the variable is > being > re-assinged and setting just the top 8 bits. I believe the intention was > bitwise-or > in the top 8 bits. Fix this by replacing the =

Re: [PATCH][next] drivers: thermal: processor_thermal_device: fix missing bitwise-or operator

2019-07-29 Thread walter harms
Am 29.07.2019 12:29, schrieb Colin King: > From: Colin Ian King > > The variable val is having the top 8 bits cleared and then the variable > is being re-assinged and setting just the top 8 bits. I believe the > intention was bitwise-or in the top 8 bits. Fix this by replacing > the =

Re: [PATCH][next] can: kvaser_pciefd: remove redundant negative check on trigger

2019-07-25 Thread walter harms
Am 25.07.2019 13:25, schrieb Colin King: > From: Colin Ian King > > The check to see if trigger is less than zero is always false, trigger > is always in the range 0..255. Hence the check is redundant and can > be removed. > > Addresses-Coverity: ("Logically dead code") > Signed-off-by:

Re: [PATCH] ALSA: cs4281: remove redundant assignment to variable val and remove a goto

2019-07-05 Thread walter harms
Am 05.07.2019 11:57, schrieb Colin King: > From: Colin Ian King > > The variable val is being assigned with a value that is never > read and it is being updated later with a new value. The > assignment is redundant and can be removed. Also remove a > goto statement and a label and replace

Re: [PATCH][next] selftests/x86: fix spelling mistake "FAILT" -> "FAIL"

2019-07-01 Thread walter harms
Am 01.07.2019 15:04, schrieb Colin King: > From: Colin Ian King > > There is an spelling mistake in an a test error message. Fix it. > > Signed-off-by: Colin Ian King > --- > tools/testing/selftests/x86/test_vsyscall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH][next][V2] media: vivid: fix potential integer overflow on left shift

2019-06-27 Thread walter harms
Am 26.06.2019 16:47, schrieb Colin King: > From: Colin Ian King > > There is a potential integer overflow when int 2 is left shifted > as this is evaluated using 32 bit arithmetic but is being used in > a context that expects an expression of type s64. Fix this by > shifting 2ULL to avoid a

Re: [PATCH][next] media: vivid: fix potential integer overflow on left shift

2019-06-25 Thread walter harms
Am 24.06.2019 23:58, schrieb Colin King: > From: Colin Ian King > > There is a potential integer overflow when int 2 is left shifted > as this is evaluated using 32 bit arithmetic but is being used in > a context that expects an expression of type s64. Fix this by > shifting 2ULL to avoid a

Re: [PATCH][next] leds: lm36274: remove redundant initialization of variable ret

2019-06-12 Thread walter harms
Am 12.06.2019 16:56, schrieb Colin King: > From: Colin Ian King > > The variable ret is being initialized with a value that is never > read, hence it is redundant and can be removed. Also move the > declaration of ret to the for loop scope. > > Addresses-Coverity: ("Unused value") >

Re: need company for kernel upgrade

2019-05-29 Thread walter harms
Am 28.05.2019 21:35, schrieb Enrico Weigelt, metux IT consult: > On 28.05.19 12:58, Pavel Machek wrote: > > Hi, > >> On Fri 2019-05-24 01:01:16, Theodore Ts'o wrote: >>> On Thu, May 23, 2019 at 09:29:11AM +0200, walter harms wrote: >>>> >>>>

Re: need company for kernel upgrade

2019-05-23 Thread walter harms
the company i am working for has a custom build arm-board. We bought the kernel from the assembler but found it has some problems that need fixing. Basically we want to improve the linux-kernel so it can run native on our boards. re, wh > Sincerely > > Aung > > On 5/22/19, walt

Re: [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value

2019-05-13 Thread walter harms
Am 12.05.2019 22:06, schrieb David Howells: > walter harms wrote: > >> Sorry, you misunderstood me, my fault, i did not see that size is unsigned. >> NTL i do not think size=0 is useful. > > Allow me to quote from the getxattr manpage: > >If size is

Re: [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value

2019-05-12 Thread walter harms
Am 12.05.2019 20:10, schrieb David Howells: > walter harms wrote: > >>> + ret = dsize; >>> + if (size > 0) { >>> + if (dsize > size) { >>> + ret = -ERANGE; >>> + goto error_key; >

Re: [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value

2019-05-12 Thread walter harms
Am 12.05.2019 09:45, schrieb David Howells: > afs_xattr_get_yfs() tries to free yacl, which may hold an error value (say > if yfs_fs_fetch_opaque_acl() failed and returned an error). > > Fix this by allocating yacl up front (since it's a fixed-length struct, > unlike afs_acl) and passing it in

Re: [PATCH] hostfs: fix mismatch between link_file definition and declaration

2019-03-18 Thread Walter Harms
Hi, Colin is obvously right with that. But my guess is that the error occured because the pattern (from, to) is brocken here. Also Maybe the maintainer can fix that. just my 2 cents, re, wh Am 18.03.2019 00:09, schrieb Colin King: > From: Colin Ian King > > The function link_file

Re: [PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-16 Thread Walter Harms
Am 16.02.2019 15:44, schrieb Colin King: > From: Colin Ian King > > Currently m_sg->baseaddr_h (a 32 bit unsigned int) is being shifted by a > total of 32 bits; this always produces a 0 result. Fix this by casting > it to a dma_addr_t (a 64 bit unsigned int) before performing the shift. > >

re: [PATCH 3/9] ALSA: emu10k1: remove redundant variable attn

2018-08-01 Thread Walter Harms
From: Colin Ian King Variable attn is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'attn' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- sound/pci/emu10k1/emupcm.c | 3 +-- 1 file

re: [PATCH 3/9] ALSA: emu10k1: remove redundant variable attn

2018-08-01 Thread Walter Harms
From: Colin Ian King Variable attn is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'attn' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- sound/pci/emu10k1/emupcm.c | 3 +-- 1 file

Re: [PATCH-next] media: s2255drv: Remove unneeded if else blocks

2018-01-25 Thread walter harms
Am 24.01.2018 22:40, schrieb Christopher Díaz Riveros: > Given the following definitions from s2255drv.c > > #define LINE_SZ_4CIFS_NTSC 640 > #define LINE_SZ_2CIFS_NTSC 640 > #define LINE_SZ_1CIFS_NTSC 320 > > and > > #define LINE_SZ_4CIFS_PAL 704 > #define

Re: [PATCH-next] media: s2255drv: Remove unneeded if else blocks

2018-01-25 Thread walter harms
Am 24.01.2018 22:40, schrieb Christopher Díaz Riveros: > Given the following definitions from s2255drv.c > > #define LINE_SZ_4CIFS_NTSC 640 > #define LINE_SZ_2CIFS_NTSC 640 > #define LINE_SZ_1CIFS_NTSC 320 > > and > > #define LINE_SZ_4CIFS_PAL 704 > #define

Re: [PATCH-next] misc: mic: Use PTR_ERR_OR_ZERO

2018-01-24 Thread walter harms
Am 23.01.2018 21:10, schrieb Christopher Díaz Riveros: > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Christopher Díaz Riveros > --- > drivers/misc/mic/scif/scif_epd.h | 4 +---

Re: [PATCH-next] misc: mic: Use PTR_ERR_OR_ZERO

2018-01-24 Thread walter harms
Am 23.01.2018 21:10, schrieb Christopher Díaz Riveros: > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Christopher Díaz Riveros > --- > drivers/misc/mic/scif/scif_epd.h | 4 +--- > 1 file changed, 1

Re: [PATCH][next] mtd: nand: fix spelling mistake: "suceed"-> "succeed"

2018-01-16 Thread walter harms
Am 16.01.2018 11:28, schrieb Colin King: > From: Colin Ian King > > Trivial fix to spelling mistakes in dev_err error message text. > > Signed-off-by: Colin Ian King > --- > drivers/mtd/nand/marvell_nand.c | 2 +- > 1 file changed, 1

Re: [PATCH][next] mtd: nand: fix spelling mistake: "suceed"-> "succeed"

2018-01-16 Thread walter harms
Am 16.01.2018 11:28, schrieb Colin King: > From: Colin Ian King > > Trivial fix to spelling mistakes in dev_err error message text. > > Signed-off-by: Colin Ian King > --- > drivers/mtd/nand/marvell_nand.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0

2017-12-15 Thread walter harms
Am 09.12.2017 01:34, schrieb Colin King: > From: Colin Ian King > > The check for secs being less than zero is redundant for two reasons. > Firstly, secs is unsigned so the check is always going to be false. > Secondly, if secs was signed the proceeding calculation of

Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0

2017-12-15 Thread walter harms
Am 09.12.2017 01:34, schrieb Colin King: > From: Colin Ian King > > The check for secs being less than zero is redundant for two reasons. > Firstly, secs is unsigned so the check is always going to be false. > Secondly, if secs was signed the proceeding calculation of secs is > never going to

Re: selftests: Testing a write attempt into a full file?

2017-12-03 Thread walter harms
Am 03.12.2017 21:46, schrieb SF Markus Elfring: > Hello, > > I have constructed another demonstration program. > > > #include > #include > #include > > int main(void) > { > FILE *f = fopen("/dev/full", "a"); > > if (!f) > goto report_failure; > > { >

Re: selftests: Testing a write attempt into a full file?

2017-12-03 Thread walter harms
Am 03.12.2017 21:46, schrieb SF Markus Elfring: > Hello, > > I have constructed another demonstration program. > > > #include > #include > #include > > int main(void) > { > FILE *f = fopen("/dev/full", "a"); > > if (!f) > goto report_failure; > > { >

Re: [PATCH RFC] stat.2: Document that stat can fail with EINTR

2017-12-03 Thread walter harms
Am 03.12.2017 01:23, schrieb Keno Fischer: > Particularly on network file systems, a stat call may require > submitting a message over the network and waiting interruptably > for a reply. > > Signed-off-by: Keno Fischer > --- > > The catalyst for this patch was me

Re: [PATCH RFC] stat.2: Document that stat can fail with EINTR

2017-12-03 Thread walter harms
Am 03.12.2017 01:23, schrieb Keno Fischer: > Particularly on network file systems, a stat call may require > submitting a message over the network and waiting interruptably > for a reply. > > Signed-off-by: Keno Fischer > --- > > The catalyst for this patch was me experiencing EINTR errors

Re: [PATCH] gpio: gpio-stmpe: make various char arrays static const, shrinks object size

2017-11-29 Thread walter harms
Am 28.11.2017 19:23, schrieb Colin King: > From: Colin Ian King > > Don't populate the read-only arrays edge_det_values, rise_values and > fall_values on the stack but instead make them static and constify them. > Makes the object code smaller by over 240 bytes: > >

Re: [PATCH] gpio: gpio-stmpe: make various char arrays static const, shrinks object size

2017-11-29 Thread walter harms
Am 28.11.2017 19:23, schrieb Colin King: > From: Colin Ian King > > Don't populate the read-only arrays edge_det_values, rise_values and > fall_values on the stack but instead make them static and constify them. > Makes the object code smaller by over 240 bytes: > > Before: >text

Re: [PATCH] ALSA: drivers: make array 'names' const, reduces object code size

2017-11-27 Thread walter harms
Am 27.11.2017 16:40, schrieb Joe Perches: > On Mon, 2017-11-27 at 15:55 +0100, walter harms wrote: >> Am 27.11.2017 13:58, schrieb Colin King: >>> From: Colin Ian King <colin.k...@canonical.com> >>> Don't populate array 'names' on the stack but instead make them

Re: [PATCH] ALSA: drivers: make array 'names' const, reduces object code size

2017-11-27 Thread walter harms
Am 27.11.2017 16:40, schrieb Joe Perches: > On Mon, 2017-11-27 at 15:55 +0100, walter harms wrote: >> Am 27.11.2017 13:58, schrieb Colin King: >>> From: Colin Ian King >>> Don't populate array 'names' on the stack but instead make them static. >>> Makes

Re: [PATCH] ALSA: drivers: make array 'names' const, reduces object code size

2017-11-27 Thread walter harms
Am 27.11.2017 13:58, schrieb Colin King: > From: Colin Ian King > > Don't populate array 'names' on the stack but instead make them static. > Makes the object code smaller by 50 bytes: > > Before: >text data bss dec hex filename > 21237

Re: [PATCH] ALSA: drivers: make array 'names' const, reduces object code size

2017-11-27 Thread walter harms
Am 27.11.2017 13:58, schrieb Colin King: > From: Colin Ian King > > Don't populate array 'names' on the stack but instead make them static. > Makes the object code smaller by 50 bytes: > > Before: >text data bss dec hex filename > 21237 91921120 31549

Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself

2017-11-20 Thread walter harms
Am 20.11.2017 18:40, schrieb Colin King: > From: Colin Ian King > > The assignment of DIV to itself is redundant and can be removed. > > Signed-off-by: Colin Ian King > --- > drivers/usb/serial/iuu_phoenix.c | 1 - > 1 file changed, 1

Re: [PATCH] USB: serial: iuu_phoenix: remove redundant assignment of DIV to itself

2017-11-20 Thread walter harms
Am 20.11.2017 18:40, schrieb Colin King: > From: Colin Ian King > > The assignment of DIV to itself is redundant and can be removed. > > Signed-off-by: Colin Ian King > --- > drivers/usb/serial/iuu_phoenix.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-17 Thread walter harms
Am 17.11.2017 12:07, schrieb Colin Ian King: > On 17/11/17 11:06, Takashi Iwai wrote: >> On Tue, 14 Nov 2017 18:26:53 +0100, >> Colin King wrote: >>> >>> From: Colin Ian King >>> >>> The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being >>> 0, 3, 6 or 9

Re: [PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-17 Thread walter harms
Am 17.11.2017 12:07, schrieb Colin Ian King: > On 17/11/17 11:06, Takashi Iwai wrote: >> On Tue, 14 Nov 2017 18:26:53 +0100, >> Colin King wrote: >>> >>> From: Colin Ian King >>> >>> The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being >>> 0, 3, 6 or 9 and so the check (13 > r) is

Re: [PATCH] tty: max3100: remove unused variable rts and remove unused assignment

2017-11-02 Thread walter harms
Am 02.11.2017 15:22, schrieb Colin Ian King: > On 02/11/17 14:21, Colin Ian King wrote: >> On 02/11/17 14:14, walter harms wrote: >>> >>> >>> Am 02.11.2017 15:01, schrieb Colin King: >>>> From: Colin Ian King <colin.k...@canonical.com> &g

Re: [PATCH] tty: max3100: remove unused variable rts and remove unused assignment

2017-11-02 Thread walter harms
Am 02.11.2017 15:22, schrieb Colin Ian King: > On 02/11/17 14:21, Colin Ian King wrote: >> On 02/11/17 14:14, walter harms wrote: >>> >>> >>> Am 02.11.2017 15:01, schrieb Colin King: >>>> From: Colin Ian King >>>> >>&g

Re: [PATCH] tty: max3100: remove unused variable rts and remove unused assignment

2017-11-02 Thread walter harms
Am 02.11.2017 15:01, schrieb Colin King: > From: Colin Ian King > > Variable rts is being assigned but it is never read, hence it can be > removed. The assignment to param_new to zero is redundant as it is > being updates a few statements later, so remove this

Re: [PATCH] tty: max3100: remove unused variable rts and remove unused assignment

2017-11-02 Thread walter harms
Am 02.11.2017 15:01, schrieb Colin King: > From: Colin Ian King > > Variable rts is being assigned but it is never read, hence it can be > removed. The assignment to param_new to zero is redundant as it is > being updates a few statements later, so remove this redundant > assignment. Cleans

Re: [PATCH] wan: wanxl: remove redundant assignment to stat

2017-11-01 Thread walter harms
Am 01.11.2017 09:49, schrieb Colin King: > From: Colin Ian King > > stat set to zero and the value is never read, instead stat is > set again in the do-loop. Hence the setting to zero is redundant > and can be removed. Cleans up clang warning: > >

Re: [PATCH] wan: wanxl: remove redundant assignment to stat

2017-11-01 Thread walter harms
Am 01.11.2017 09:49, schrieb Colin King: > From: Colin Ian King > > stat set to zero and the value is never read, instead stat is > set again in the do-loop. Hence the setting to zero is redundant > and can be removed. Cleans up clang warning: > > drivers/net/wan/wanxl.c:737:2: warning: Value

Re: Documenting sigaltstack SS_AUTODISRM

2017-10-30 Thread walter harms
Am 30.10.2017 11:50, schrieb Michael Kerrisk (man-pages): > Hi Walter, > > On 10/30/2017 11:21 AM, walter harms wrote: >> >> >> Am 30.10.2017 11:04, schrieb Michael Kerrisk (man-pages): >>> [So, things fell on the floor, a while back.] >>> &

Re: Documenting sigaltstack SS_AUTODISRM

2017-10-30 Thread walter harms
Am 30.10.2017 11:50, schrieb Michael Kerrisk (man-pages): > Hi Walter, > > On 10/30/2017 11:21 AM, walter harms wrote: >> >> >> Am 30.10.2017 11:04, schrieb Michael Kerrisk (man-pages): >>> [So, things fell on the floor, a while back.] >>> &

Re: Documenting sigaltstack SS_AUTODISRM

2017-10-30 Thread walter harms
Am 30.10.2017 11:04, schrieb Michael Kerrisk (man-pages): > [So, things fell on the floor, a while back.] > > On 05/25/2017 11:17 AM, Stas Sergeev wrote: >> 24.05.2017 14:09, Michael Kerrisk (man-pages) пишет: >>> One could do this I suppose, but I read POSIX differently from >>> you and, more

Re: Documenting sigaltstack SS_AUTODISRM

2017-10-30 Thread walter harms
Am 30.10.2017 11:04, schrieb Michael Kerrisk (man-pages): > [So, things fell on the floor, a while back.] > > On 05/25/2017 11:17 AM, Stas Sergeev wrote: >> 24.05.2017 14:09, Michael Kerrisk (man-pages) пишет: >>> One could do this I suppose, but I read POSIX differently from >>> you and, more

Re: [PATCH 5/8] video: fbdev: au1200fb: Fix error handling path

2017-10-17 Thread walter harms
Am 16.10.2017 21:04, schrieb Christophe JAILLET: > Rewrite the exit path based on 'au1200fb_drv_remove()'. > We can safely iterate for all already handled planes. Even if not > completely initialized, the functions that are called will silently accept > the 'fb_info' structure that is passed. >

Re: [PATCH 5/8] video: fbdev: au1200fb: Fix error handling path

2017-10-17 Thread walter harms
Am 16.10.2017 21:04, schrieb Christophe JAILLET: > Rewrite the exit path based on 'au1200fb_drv_remove()'. > We can safely iterate for all already handled planes. Even if not > completely initialized, the functions that are called will silently accept > the 'fb_info' structure that is passed. >

Re: [PATCH] selinux: remove extraneous initialization of slots_used and max_chain_len

2017-10-14 Thread walter harms
Am 14.10.2017 16:52, schrieb Colin King: > From: Colin Ian King > > Variables slots_used and max_chain_len are being initialized to zero > twice. Remove the first set of initializations. Cleans up the > clang warnings: > > Value stored to 'slots_used' is never read >

Re: [PATCH] selinux: remove extraneous initialization of slots_used and max_chain_len

2017-10-14 Thread walter harms
Am 14.10.2017 16:52, schrieb Colin King: > From: Colin Ian King > > Variables slots_used and max_chain_len are being initialized to zero > twice. Remove the first set of initializations. Cleans up the > clang warnings: > > Value stored to 'slots_used' is never read > Value stored to

Re: [PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-10 Thread walter harms
Am 10.10.2017 08:05, schrieb Christophe JAILLET: > Le 09/10/2017 à 23:22, walter harms a écrit : >> Am 08.10.2017 11:39, schrieb Christophe JAILLET: >>> All error handling paths 'goto err_drop_spawn' except this one. >>> In order to avoid some resources leak, w

Re: [PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-10 Thread walter harms
Am 10.10.2017 08:05, schrieb Christophe JAILLET: > Le 09/10/2017 à 23:22, walter harms a écrit : >> Am 08.10.2017 11:39, schrieb Christophe JAILLET: >>> All error handling paths 'goto err_drop_spawn' except this one. >>> In order to avoid some resources leak, w

Re: [PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-09 Thread walter harms
Am 08.10.2017 11:39, schrieb Christophe JAILLET: > All error handling paths 'goto err_drop_spawn' except this one. > In order to avoid some resources leak, we should do it as well here. > > Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") > Signed-off-by: Christophe JAILLET

Re: [PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-09 Thread walter harms
Am 08.10.2017 11:39, schrieb Christophe JAILLET: > All error handling paths 'goto err_drop_spawn' except this one. > In order to avoid some resources leak, we should do it as well here. > > Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") > Signed-off-by: Christophe JAILLET > --- >

Re: [PATCH] staging: rtl8192u: fix incorrect mask when calculating TxPowerLevelCCK

2017-09-05 Thread walter harms
Am 05.09.2017 18:32, schrieb Colin King: > From: Colin Ian King > > The mask of 0xff and right shift of 8 bits on ret always results in > a value of 0 for TxPowerLevelCCK. I believe this should be a mask of > 0xff00, however I do not have the hardware at hand to test

Re: [PATCH] staging: rtl8192u: fix incorrect mask when calculating TxPowerLevelCCK

2017-09-05 Thread walter harms
Am 05.09.2017 18:32, schrieb Colin King: > From: Colin Ian King > > The mask of 0xff and right shift of 8 bits on ret always results in > a value of 0 for TxPowerLevelCCK. I believe this should be a mask of > 0xff00, however I do not have the hardware at hand to test this out, > so there is a

Re: [PATCH] x86/microcode/intel: Improve microcode patches saving flow

2017-08-25 Thread walter harms
Am 25.08.2017 12:04, schrieb Borislav Petkov: > From: Borislav Petkov > > Avoid potentially dereferencing a NULL pointer when saving a microcode > patch for early loading on the application processors. > > While at it, drop the IS_ERR() checking in favor of simpler, NULL-ptr >

Re: [PATCH] x86/microcode/intel: Improve microcode patches saving flow

2017-08-25 Thread walter harms
Am 25.08.2017 12:04, schrieb Borislav Petkov: > From: Borislav Petkov > > Avoid potentially dereferencing a NULL pointer when saving a microcode > patch for early loading on the application processors. > > While at it, drop the IS_ERR() checking in favor of simpler, NULL-ptr > checks which

Re: [PATCH] netfilter: fix indent on in statements

2017-08-15 Thread walter harms
Am 15.08.2017 08:50, schrieb Colin King: > From: Colin Ian King > > The returns on some if statements are not indented correctly, > add in the missing tab. > > Signed-off-by: Colin Ian King > --- > net/bridge/netfilter/ebt_ip.c | 4 ++-- >

Re: [PATCH] netfilter: fix indent on in statements

2017-08-15 Thread walter harms
Am 15.08.2017 08:50, schrieb Colin King: > From: Colin Ian King > > The returns on some if statements are not indented correctly, > add in the missing tab. > > Signed-off-by: Colin Ian King > --- > net/bridge/netfilter/ebt_ip.c | 4 ++-- > net/bridge/netfilter/ebt_ip6.c | 2 +- > 2 files

Re: [PATCH 1/3 v2] thermal: core: Add some new helper functions to free resources

2017-08-11 Thread walter harms
Am 08.08.2017 16:39, schrieb Christophe JAILLET: > In order to easily free resources allocated by > 'thermal_zone_create_device_groups()' we need 2 new helper functions. > > The first one undoes 'thermal_zone_create_device_groups()'. > The 2nd one undoes 'create_trip_attrs()', which is a

Re: [PATCH 1/3 v2] thermal: core: Add some new helper functions to free resources

2017-08-11 Thread walter harms
Am 08.08.2017 16:39, schrieb Christophe JAILLET: > In order to easily free resources allocated by > 'thermal_zone_create_device_groups()' we need 2 new helper functions. > > The first one undoes 'thermal_zone_create_device_groups()'. > The 2nd one undoes 'create_trip_attrs()', which is a

Re: [PATCH] scsi: mpt3sas: Fix memory allocation failure test in 'mpt3sas_base_attach()'

2017-08-07 Thread walter harms
Am 07.08.2017 00:51, schrieb Christophe JAILLET: > In the lines above this test, 8 'kzalloc' are performed, but only 7 results > are tested. > > Add the missing one (i.e. '!ioc->port_enable_cmds.reply'). > > Signed-off-by: Christophe JAILLET > --- >

Re: [PATCH] scsi: mpt3sas: Fix memory allocation failure test in 'mpt3sas_base_attach()'

2017-08-07 Thread walter harms
Am 07.08.2017 00:51, schrieb Christophe JAILLET: > In the lines above this test, 8 'kzalloc' are performed, but only 7 results > are tested. > > Add the missing one (i.e. '!ioc->port_enable_cmds.reply'). > > Signed-off-by: Christophe JAILLET > --- > drivers/scsi/mpt3sas/mpt3sas_base.c | 8

Re: [PATCH][mtd-next] mtd: spi-nor: remove redundant check on err

2017-08-01 Thread walter harms
Am 01.08.2017 18:33, schrieb Cyrille Pitchen: > Hi Colin, > > Le 29/06/2017 à 19:50, Colin King a écrit : >> From: Colin Ian King >> >> The variable err is not updated since the previous check on it, so >> the subsequent check on err is redundant and can be removed.

Re: [PATCH][mtd-next] mtd: spi-nor: remove redundant check on err

2017-08-01 Thread walter harms
Am 01.08.2017 18:33, schrieb Cyrille Pitchen: > Hi Colin, > > Le 29/06/2017 à 19:50, Colin King a écrit : >> From: Colin Ian King >> >> The variable err is not updated since the previous check on it, so >> the subsequent check on err is redundant and can be removed. >> >> Detected by

Re: [PATCH] dmaengine: ioatdma: Fix error handling path in 'ioat_dma_self_test()'

2017-07-21 Thread walter harms
Am 20.07.2017 18:56, schrieb Dave Jiang: > > > On 07/20/2017 12:24 AM, walter harms wrote: >> >> >> Am 20.07.2017 00:16, schrieb Christophe JAILLET: >>> If the 'memcmp' fails, free allocated resources as done in all other >>> error handling pat

Re: [PATCH] dmaengine: ioatdma: Fix error handling path in 'ioat_dma_self_test()'

2017-07-21 Thread walter harms
Am 20.07.2017 18:56, schrieb Dave Jiang: > > > On 07/20/2017 12:24 AM, walter harms wrote: >> >> >> Am 20.07.2017 00:16, schrieb Christophe JAILLET: >>> If the 'memcmp' fails, free allocated resources as done in all other >>> error handling pat

Re: [PATCH] dmaengine: ioatdma: Fix error handling path in 'ioat_dma_self_test()'

2017-07-20 Thread walter harms
Am 20.07.2017 00:16, schrieb Christophe JAILLET: > If the 'memcmp' fails, free allocated resources as done in all other > error handling paths. > > Signed-off-by: Christophe JAILLET > --- > Please review carefully, this patch looks "too obvious" to me! > --- >

Re: [PATCH] dmaengine: ioatdma: Fix error handling path in 'ioat_dma_self_test()'

2017-07-20 Thread walter harms
Am 20.07.2017 00:16, schrieb Christophe JAILLET: > If the 'memcmp' fails, free allocated resources as done in all other > error handling paths. > > Signed-off-by: Christophe JAILLET > --- > Please review carefully, this patch looks "too obvious" to me! > --- > drivers/dma/ioat/init.c | 2 +- >

  1   2   3   4   >