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: mtk.

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 Cc

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; amd-...@lists.

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 Gleix

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. Oktobe

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. Oktobe

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: bfie...@field

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
move BUFLEN 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

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 Auf

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 secti

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 [linux-man-

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: mtk.manpa...@gmail.com

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, &kone->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 n

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 [dhowe...@redha

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 a

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 = res

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 multipl

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 sig

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 exten

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: Christop

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 ca

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 = op

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 = operat

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: Coli

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 wit

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 3

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 3

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") > Signed-o

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 declarati

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. > > Det

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 changed,

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 LINE_SZ_2C

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 i

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 a/drivers/mtd/

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 b

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 experiencing EINTR errors whe

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 >>> Don't populate array 'names' on the stack but instead make them static. >

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 deletion(-) > > diff --git a/drivers/usb/serial/iuu_phoe

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 >>>> >>>&

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 up

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: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 i

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 > Value stored to 'max_chain

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 resourc

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 > --- > cr

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 > checks which are

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 ch

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 functio

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. >> >> Detected by CoveritySc

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 ha

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 +- >

Re: [PATCH] staging: speakup: make function ser_to_dev static

2017-06-28 Thread walter harms
Am 28.06.2017 15:13, schrieb Colin King: > From: Colin Ian King > > The helper function ser_to_dev does not need to be in global scope, so > make it static. > > Cleans up sparse warning: > "warning: symbol 'ser_to_dev' was not declared. Should it be static?" > > Signed-off-by: Colin Ian King

Re: [PATCH 1/2] scsi: qedi: Fix a return value in case of error in 'qedi_alloc_global_queues'

2017-06-11 Thread walter harms
Am 11.06.2017 08:40, schrieb Christophe JAILLET: > We should return -ENOMEM in case of memory allocation error, as done > elsewhere in this function. > > Fixes: ace7f46ba5fde ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver > framework.") > Signed-off-by: Christophe JAILLET > --- > driv

Re: [PATCH 1/3] scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues'

2017-06-11 Thread walter harms
Am 11.06.2017 08:16, schrieb Christophe JAILLET: > We should return -ENOMEM in case of memory allocation error, as done > elsewhere in this function. > > Fixes: 61d8658b4a435 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver > framework.") > Signed-off-by: Christophe JAILLET > --- > drive

Re: [PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-18 Thread walter harms
Am 17.05.2017 20:13, schrieb Colin King: > From: Colin Ian King > > The current for loop decrements i when it is zero and this causes > a wrap-around back to ~0 because i is unsigned. In the unlikely event > that mask is 0, the loop will run forever. Fix this so we can't loop > forever. > > De

Re: [PATCH] scsi: aacraid: fix leak of data from stack back to userspace

2017-05-15 Thread walter harms
Am 15.05.2017 16:56, schrieb Colin King: > From: Colin Ian King > > The fields sense_data_size and sense_data are unitialized garbage from > the stack and are being copied back to userspace. Fix this leak of > stack information by ensuring they are zero'd. > > Detected by CoverityScan, CID#14

Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'

2017-05-13 Thread walter harms
Am 13.05.2017 13:40, schrieb Christophe JAILLET: > This looks spurious to iounmap resources in the normal path of this init > function. > The 3 ioremap'ed fields of 'pm_config' can be accessed later on in other > functions, so it is likely that we should return 'success' before unrolling > everyt

Re: [PATCH] firmware: Google VPD: fix error handling on allocation failures

2017-05-03 Thread walter harms
Am 03.05.2017 17:49, schrieb Colin King: > From: Colin Ian King > > Fix two allocation failure checks. Firstly, ensure info is checked > for a failed allocation; this fixes a potential null pointer > dereference issue on info->key. Secondly, free info is info->key > fails to allocate to fix a

Re: [PATCH] NFC: trf7970a: Correct register settings for 27MHz clock

2017-04-26 Thread walter harms
Am 26.04.2017 15:48, schrieb Geoff Lansberry: > In prior commits the selected clock frequency does not propagate > correctly to what is written the the TRF7970A_MODULATOR_SYS_CLK_CTRL > register. > Also fixes a bug that causes the device tree property check to always > pass. > > Signed-off-by: G

Re: [PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread walter harms
Am 30.03.2017 08:25, schrieb Daeseok Youn: > Define new local variable to reduce the number of reference. > The new local variable is added to save the addess of dfs > and used in atomisp_freq_scaling() function. > > Signed-off-by: Daeseok Youn > --- > .../media/atomisp/pci/atomisp2/atomisp_cm

Re: [PATCH] Add checks for kmalloc allocation failures

2017-03-29 Thread walter harms
Am 29.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Ensure we don't end up with a null pointer dereferences by checking > for for allocation failures. Allocate by sizeof(*ptr) rather than > the type to fix checkpack warnings. Also merge multiple lines into > one line for the k

Re: [PATCH] VSOCK: remove unnecessary ternary operator on return value

2017-03-28 Thread walter harms
Am 28.03.2017 17:54, schrieb Colin King: > From: Colin Ian King > > Rather than assign the positive errno values to ret and then > checking if it is positive and flip the sign, just set ret to > be the -ve errno value. > > Detected by CoverityScan, CID#986649 ("Logically Dead Code") > > Signe

Re: [PATCH] [media] coda: remove redundant call to v4l2_m2m_get_vq

2017-03-27 Thread walter harms
Am 27.03.2017 12:10, schrieb Philipp Zabel: > On Mon, 2017-03-27 at 11:46 +0200, Hans Verkuil wrote: >> On 23/03/17 12:57, Colin King wrote: >>> From: Colin Ian King >>> >>> The call to v4ls_m2m_get_vq is only used to get the return value >>> which is not being used, so it appears to be redundan

Re: [PATCH] drm/gma500: fix memory leak on edid

2017-03-20 Thread walter harms
Am 20.03.2017 18:56, schrieb Colin King: > From: Colin Ian King > > edid is allocated on the call to psb_intel_sdvo_get_edid but not > kfree'd at all, causing a memory leak. Fix this by kfree'ing > the edid. (This may be null, but kfree can handle null frees). > > Detected by CoverityScan, C

Re: [PATCH 2/4] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread walter harms
Am 20.03.2017 13:51, schrieb DaeSeok Youn: > 2017-03-20 21:04 GMT+09:00 walter harms : >> >> >> Am 20.03.2017 11:59, schrieb Daeseok Youn: >>> If v4l2_subdev_call() gets the global frame interval values, >>> it returned 0 and it could be checked whether n

Re: [PATCH 2/4] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread walter harms
Am 20.03.2017 11:59, schrieb Daeseok Youn: > If v4l2_subdev_call() gets the global frame interval values, > it returned 0 and it could be checked whether numerator is zero or not. > > If the numerator is not zero, the fps could be calculated in this function. > If not, it just returns 0. > > Si

Re: [PATCH] staging: wilc1000: fix incorrect copy of pmkid data

2017-03-17 Thread walter harms
Am 17.03.2017 00:21, schrieb Colin King: > From: Colin Ian King > > The pmkid data is meant be be copied to the previous item in the > pmkidlist, however the code is just copying the data to itself because > the src index into pmkidlist is the same as the dst index into pmkidlist. > Fix this wi

Re: [PATCH] staging: atomisp: clean up return logic, remove redunant code

2017-03-12 Thread walter harms
Am 11.03.2017 20:32, schrieb Colin King: > From: Colin Ian King > > There is no need to check if ret is non-zero, remove this > redundant check and just return the error status from the call > to mt9m114_write_reg_array. > > Detected by CoverityScan, CID#1416577 ("Identical code for > differen

Re: [PATCH] ASoC: cs35l35: trivial fix to indentation

2017-03-12 Thread walter harms
Am 11.03.2017 20:19, schrieb Colin King: > From: Colin Ian King > > Remove extraneous tab to correct the nesting level indentation > > Detected by CoverityScan, CID#1416584 ("Nesting level does > not match indentation") > > Signed-off-by: Colin Ian King > --- > sound/soc/codecs/cs35l35.c |

Re: [PATCH] [media] atmel-isc: fix off-by-one comparison and out of bounds read issue

2017-03-09 Thread walter harms
Am 09.03.2017 11:57, schrieb Hans Verkuil: > Hi Songjun, > > On 08/03/17 03:25, Wu, Songjun wrote: >> Hi Colin, >> >> Thank you for your comment. >> It is a bug, will be fixed in the next patch. > > Do you mean that you will provide a new patch for this? Is there anything > wrong with this patc

Re: [PATCH v2] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread walter harms
looks good to me. Reviewed-by: wha...@bfs.de Am 26.02.2017 13:10, schrieb Christophe JAILLET: > If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the > clk already handled. > > With the current implemenatation, we try to do that on the clk that has > triggered the error, which

Re: [PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread walter harms
Am 26.02.2017 08:52, schrieb Christophe JAILLET: > If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the > clk already handled. > > With the current implemenatation, we try to do that on the clk that has > triggered the error, which is a no-op, and leave 'msm_host->bus_clks[0]

Re: [PATCH] tools/vm: Fix possible resource leak in page_owner_sort.c

2017-02-19 Thread walter harms
Am 19.02.2017 06:49, schrieb Saurabh Badhwar: > Fix possible resource leak in tools/vm/page_owner_sort.c > Signed-off-by: Saurabh Badhwar > --- > tools/vm/page_owner_sort.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_o

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread walter harms
Am 13.02.2017 14:03, schrieb Timur Tabi: > walter harms wrote: >> We have a function where the argument is ignored and the rest is const ? >> >> emac_ethtool_get_regs_len seems the only user. So it would be fairly >> easy to >> move that into that function.

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread walter harms
Am 13.02.2017 12:00, schrieb Dan Carpenter: > We had intended to say "sizeof(u32)" but the "u" is missing. > Fortunately, sizeof(32) is also 4, so the original code still works. > > Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading > hardware registers") > Signed-off-by: Dan

Re: [PATCH] ovl: Avoid some memory allocation

2017-02-11 Thread walter harms
Am 10.02.2017 22:18, schrieb Christophe JAILLET: > Reorder code to avoid allocating and then freeing some memory in an error > handling path. > > Signed-off-by: Christophe JAILLET > --- > fs/overlayfs/namei.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/ov

Re: [PATCH] Smack: fix a dereference before null check on sock->sk

2017-02-09 Thread walter harms
Am 09.02.2017 13:03, schrieb Colin King: > From: Colin Ian King > > The initialisation of pointer ssp is from a dereference on sock->sk > before sock-sk is null checked, hence there is a potential for a > null pointer deference. Fix this by moving the assignment of ssp > to just before it is u

Re: [PATCH] usb: storage: fix infinite wait loop by incrementing loop counter

2017-02-02 Thread walter harms
Am 02.02.2017 14:19, schrieb Colin King: > From: Colin Ian King > > If jumpshot_get_status continues to return a failed result then the > wait loop will spin forever because the waitcount counter is never > being incremented and we don't ever timeout. Fix this by incrementing > waitcount. > >

Re: [PATCH] scsi_dh_emc: fix uninitialized return value ret

2017-01-31 Thread walter harms
Am 31.01.2017 13:22, schrieb Colin King: > From: Colin Ian King > > ret is uninitialized on a successful execution of clarrion_std_inquiry > and a garbage return value is being returted. Fix this by setting ret > to zero on the success exit path. > > Found by CoverityScan, CID#1398889 ("Unini

Re: [PATCH] acpi: nfit: use %u format string specifier for unsigned ints

2017-01-30 Thread walter harms
Am 30.01.2017 12:25, schrieb Colin King: > From: Colin Ian King > > scrub_mode and scrub_count are both unsigned ints, however, the %d > format string specifier is being used instead of %u. Trivial fix, > use %u. > > Signed-off-by: Colin Ian King > --- > drivers/acpi/nfit/core.c | 4 ++-- >

  1   2   3   >