Re: [PATCH] docs: devicetree: Fix typo in lvds.yaml

2024-09-01 Thread Kuan-Wei Chiu
; > > Signed-off-by: Yu-Chun Lin > > Reviewed-by: Laurent Pinchart > LGTM. Feel free to add: Reviewed-by: Kuan-Wei Chiu Regards, Kuan-Wei > > --- > > Documentation/devicetree/bindings/display/lvds.yaml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(

[PATCH] drm/i915/gvt: Optimize mmio_offset_compare() for efficiency

2023-10-13 Thread Kuan-Wei Chiu
roving efficiency and reducing code size. This change reduces the number of comparison operations from 1-2 to a single subtraction operation, thereby saving the number of instructions. Signed-off-by: Kuan-Wei Chiu --- drivers/gpu/drm/i915/gvt/debugfs.c | 6 +- 1 file changed, 1 insertion

[PATCH v2] drm/i915/gvt: Optimize mmio_offset_compare() for efficiency

2023-10-13 Thread Kuan-Wei Chiu
roving efficiency and reducing code size. This change reduces the number of comparison operations from 1-2 to a single subtraction operation, thereby saving the number of instructions. Signed-off-by: Kuan-Wei Chiu --- v1 -> v2: - Add explicit type cast in case the sizes of u32 and int differ.

Re: [PATCH] drm/tests: helpers: Fix compile wrarning

2025-01-03 Thread Kuan-Wei Chiu
t; >> drivers/gpu/drm/tests/drm_kunit_helpers.c:324: warning: bad line: for a > > >> KUnit test > > > > Reported-by: kernel test robot > > Closes: > > https://lore.kernel.org/oe-kbuild-all/202501032001.o6wy1vcw-...@intel.com/ > > Reviewed-by: Kuan-Wei Chiu &

[PATCH v3 14/16] fsi: i2cr: Replace open-coded parity calculation with parity64()

2025-03-15 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change parity ^= parity64(v) to parity

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-23 Thread Kuan-Wei Chiu
On Thu, Mar 13, 2025 at 03:41:49PM +0800, Kuan-Wei Chiu wrote: > On Thu, Mar 13, 2025 at 12:29:13AM +0800, Kuan-Wei Chiu wrote: > > On Wed, Mar 12, 2025 at 11:51:12AM -0400, Yury Norov wrote: > > > On Tue, Mar 11, 2025 at 03:24:14PM -0700, H. Peter Anvin wrote: > > > >

Re: [PATCH v4 01/13] bitops: Change parity8() to parity_odd() with u64 input and bool return type

2025-04-09 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 11:39:22AM -0700, Guenter Roeck wrote: > On 4/9/25 11:25, Kuan-Wei Chiu wrote: > > On Wed, Apr 09, 2025 at 12:59:14PM -0400, Yury Norov wrote: > > > On Wed, Apr 09, 2025 at 11:43:44PM +0800, Kuan-Wei Chiu wrote: > > > > Redesign the

[PATCH v4 11/13] mtd: ssfdc: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/mtd/ssfdc.c | 20 1 file changed, 4 insertions(+), 16

Re: [PATCH v4 00/13] Introduce parity_odd() and refactor redundant parity code

2025-04-09 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 12:54:35PM -0400, Yury Norov wrote: > On Wed, Apr 09, 2025 at 11:43:43PM +0800, Kuan-Wei Chiu wrote: > > Several parts of the kernel contain open-coded and redundant > > implementations of parity calculation. This patch series introduces > > a unifi

Re: [PATCH v4 02/13] media: media/test_drivers: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 01:03:42PM -0400, Yury Norov wrote: > On Wed, Apr 09, 2025 at 11:43:45PM +0800, Kuan-Wei Chiu wrote: > > Refactor parity calculations to use the standard parity_odd() helper. > > This change eliminates redundant implementations. > > > > C

Re: [PATCH v4 03/13] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 08:43:09PM +0200, Arend van Spriel wrote: > On 4/9/2025 5:43 PM, Kuan-Wei Chiu wrote: > > Refactor parity calculations to use the standard parity_odd() helper. > > This change eliminates redundant implementations. > > > > Co-developed-by: Yu-Chun

[PATCH v4 07/13] Input: joystick - Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/input/joystick/grip_mp.c| 17 ++--- drivers/input/joystick

[PATCH v4 05/13] serial: max3100: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/tty/serial/max3100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v4 06/13] lib/bch: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- lib/bch.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff

[PATCH v4 01/13] bitops: Change parity8() to parity_odd() with u64 input and bool return type

2025-04-09 Thread Kuan-Wei Chiu
mance-critical paths arises. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- arch/x86/kernel/bootflag.c | 4 ++-- drivers/hwmon/spd5118.c | 2 +- drivers/i3c/master/dw-i3c-master.c | 2 +- drivers/i3c/master/i3c-m

[PATCH v4 03/13] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/pci/cx18/cx18-av-vbi.c | 12 ++-- 1 file changed, 2 insertions

[PATCH v4 02/13] media: media/test_drivers: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/test-drivers/vivid/vivid-vbi-gen.c | 8 ++-- 1 file changed, 2

[PATCH v4 13/13] nfp: bpf: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 7 +-- 1 file changed, 1

[PATCH v4 12/13] fsi: i2cr: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/fsi/fsi-master-i2cr.c | 20 +++- 1 file changed, 3

[PATCH v4 09/13] wifi: brcm80211: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu Acked-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmsmac/dma.c | 18

[PATCH v4 10/13] drm/bridge: dw-hdmi: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 8 ++-- 1 file changed, 2

[PATCH v4 04/13] media: saa7115: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/i2c/saa7115.c | 12 ++-- 1 file changed, 2 insertions(+), 10

[PATCH v4 08/13] net: ethernet: oa_tc6: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity_odd() helper. This change eliminates redundant implementations. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/oa_tc6.c | 19 +++ 1 file changed, 3 insertions

Re: [PATCH v4 05/13] serial: max3100: Replace open-coded parity calculation with parity_odd()

2025-04-09 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 01:24:08PM -0400, Yury Norov wrote: > On Wed, Apr 09, 2025 at 11:43:48PM +0800, Kuan-Wei Chiu wrote: > > Refactor parity calculations to use the standard parity_odd() helper. > > This change eliminates redundant implementations. > > > > C

[PATCH v4 00/13] Introduce parity_odd() and refactor redundant parity code

2025-04-09 Thread Kuan-Wei Chiu
-Chun Lin Signed-off-by: Kuan-Wei Chiu --- To H. Peter: I understand your preference for a parity8/16/32/64() style interface, and I agree that such a design would better accommodate potential arch-specific implementations. However, I suspect there are very few, if any, users who care about the

Re: [PATCH v4 00/13] Introduce parity_odd() and refactor redundant parity code

2025-04-11 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 07:09:28PM -0700, H. Peter Anvin wrote: > On 4/9/25 11:33, Yury Norov wrote: > > > > > > > I don't have a strong preference for the name, but if I had to guess > > > the return value from the function prototype, I would intuitively > > > expect an int to return "0 for even

Re: [PATCH v4 03/13] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity_odd()

2025-04-11 Thread Kuan-Wei Chiu
On Thu, Apr 10, 2025 at 07:08:58AM +0200, Arend Van Spriel wrote: > On April 10, 2025 12:06:52 AM Johannes Berg wrote: > > > On Wed, 2025-04-09 at 20:43 +0200, Arend van Spriel wrote: > > > > > > This is orthogonal to the change to parity_odd() though. More specific > > > to the new parity_odd()

Re: [PATCH v4 02/13] media: media/test_drivers: Replace open-coded parity calculation with parity_odd()

2025-04-10 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 02:41:03PM -0400, Yury Norov wrote: > On Thu, Apr 10, 2025 at 02:23:09AM +0800, Kuan-Wei Chiu wrote: > > On Wed, Apr 09, 2025 at 01:03:42PM -0400, Yury Norov wrote: > > > On Wed, Apr 09, 2025 at 11:43:45PM +0800, Kuan-Wei Chiu wrote: > > > > R

Re: [PATCH v4 01/13] bitops: Change parity8() to parity_odd() with u64 input and bool return type

2025-04-10 Thread Kuan-Wei Chiu
On Wed, Apr 09, 2025 at 12:59:14PM -0400, Yury Norov wrote: > On Wed, Apr 09, 2025 at 11:43:44PM +0800, Kuan-Wei Chiu wrote: > > Redesign the parity8() helper as parity_odd(), changing its input type > > from u8 to u64 to support broader use cases and its return type from >

Re: [PATCH v4 00/13] Introduce parity_odd() and refactor redundant parity code

2025-04-26 Thread Kuan-Wei Chiu
On Fri, Apr 25, 2025 at 12:33:21PM -0700, H. Peter Anvin wrote: > On 4/11/25 09:34, Kuan-Wei Chiu wrote: > > > > > > In either case, instead of packing the cascade into one function, make > > > good > > > use of it. > > > > > > In the

Re: [PATCH v2 01/18] lib/parity: Add __builtin_parity() fallback implementations

2025-03-02 Thread Kuan-Wei Chiu
Hi Yury, On Sun, Mar 02, 2025 at 11:02:12AM -0500, Yury Norov wrote: > On Sun, Mar 02, 2025 at 04:20:02PM +0800, Kuan-Wei Chiu wrote: > > Hi Yury, > > > > On Sat, Mar 01, 2025 at 10:10:20PM -0500, Yury Norov wrote: > > > On Sat, Mar 01, 2025 at 10:23:52PM +0800, Ku

Re: [PATCH v2 01/18] lib/parity: Add __builtin_parity() fallback implementations

2025-03-03 Thread Kuan-Wei Chiu
On Mon, Mar 03, 2025 at 10:43:28AM -0500, Yury Norov wrote: > On Mon, Mar 03, 2025 at 10:47:20AM +0800, Kuan-Wei Chiu wrote: > > > > #define parity(val) \ > > > > ({ \ > > &

[PATCH v2 00/18] Introduce and use generic parity16/32/64 helper

2025-03-01 Thread Kuan-Wei Chiu
-coded parity calculations with the new helpers, reducing code duplication and improving maintainability. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- This patch series is based on next-20250228. Changes in v2: - Provide fallback functions for

[PATCH v2 02/18] bitops: Optimize parity8() using __builtin_parity()

2025-03-01 Thread Kuan-Wei Chiu
-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- include/linux/bitops.h | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index c1cb53cf2f0f..4c307d9c1545 100644 --- a/include/linux/bitops.h +++ b

[PATCH v2 04/18] media: media/test_drivers: Replace open-coded parity calculation with parity8()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/test-drivers/vivid/vivid-vbi-gen.c | 8

[PATCH v2 03/18] bitops: Add parity16(), parity32(), and parity64() helpers

2025-03-01 Thread Kuan-Wei Chiu
using the _parity_const() macro to allow constant folding. These additions provide parity computation helpers for larger integer types, ensuring consistency and performance across different bit-widths. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu

[PATCH v2 01/18] lib/parity: Add __builtin_parity() fallback implementations

2025-03-01 Thread Kuan-Wei Chiu
patch serves as preparation for using __builtin_parity() by ensuring a fallback mechanism is available when the compiler does not inline the __builtin_parity(). Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- lib/Makefile | 2 +- lib/parity.c | 48

[PATCH v2 06/18] media: saa7115: Replace open-coded parity calculation with parity8()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/i2c/saa7115.c | 12 ++-- 1 file

[PATCH v2 08/18] lib/bch: Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- lib/bch.c | 14 +- 1 file changed, 1

[PATCH v2 07/18] serial: max3100: Replace open-coded parity calculation with parity8()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/tty/serial/max3100.c | 3 ++- 1 file changed, 2

[PATCH v2 10/18] net: ethernet: oa_tc6: Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/oa_tc6.c | 19 +++ 1

[PATCH v2 12/18] drm/bridge: dw-hdmi: Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 8

[PATCH v2 16/18] Input: joystick - Replace open-coded parity calculation with parity64()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/input/joystick/sidewinder.c | 24

[PATCH v2 18/18] bitops: Add parity() macro for automatic type-based selection

2025-03-01 Thread Kuan-Wei Chiu
does not match the supported sizes, BUILD_BUG() is triggered to catch invalid usage at compile time. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Place this patch last in the series to avoid compilation errors. include/linux/bitops.h | 22

[PATCH v2 17/18] nfp: bpf: Replace open-coded parity calculation with parity64()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 7

[PATCH v2 15/18] fsi: i2cr: Replace open-coded parity calculation with parity64()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/fsi/fsi-master-i2cr.c | 8 +--- 1 file

Re: [PATCH v2 01/18] lib/parity: Add __builtin_parity() fallback implementations

2025-03-02 Thread Kuan-Wei Chiu
Hi Yury, On Sat, Mar 01, 2025 at 10:10:20PM -0500, Yury Norov wrote: > On Sat, Mar 01, 2025 at 10:23:52PM +0800, Kuan-Wei Chiu wrote: > > Add generic C implementations of __paritysi2(), __paritydi2(), and > > __parityti2() as fallback functions in lib/parity.c. These functions

Re: [PATCH v2 01/18] lib/parity: Add __builtin_parity() fallback implementations

2025-03-02 Thread Kuan-Wei Chiu
On Sun, Mar 02, 2025 at 07:09:54PM +, David Laight wrote: > On Mon, 3 Mar 2025 01:29:19 +0800 > Kuan-Wei Chiu wrote: > > > Hi Yury, > > > > On Sun, Mar 02, 2025 at 11:02:12AM -0500, Yury Norov wrote: > > > On Sun, Mar 02, 2025 at 04:20:02PM +0800, Ku

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-07 Thread Kuan-Wei Chiu
Hi Jiri, On Fri, Mar 07, 2025 at 07:57:48AM +0100, Jiri Slaby wrote: > On 06. 03. 25, 17:25, Kuan-Wei Chiu wrote: > > Several parts of the kernel contain redundant implementations of parity > > calculations for 16/32/64-bit values. Introduces generic > > parity16/32/64(

[PATCH v3 07/16] lib/bch: Replace open-coded parity calculation with parity32()

2025-03-07 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change parity32(mask) to !!parity32(mask

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-07 Thread Kuan-Wei Chiu
+Cc Waiman Long for bool cast to int discussion Hi Peter, On Thu, Mar 06, 2025 at 07:14:13PM -0800, H. Peter Anvin wrote: > On March 6, 2025 8:25:25 AM PST, Kuan-Wei Chiu wrote: > >Several parts of the kernel contain redundant implementations of parity > >calculations for 16/3

[PATCH v3 05/16] media: saa7115: Replace open-coded parity calculation with parity8()

2025-03-07 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/i2c/saa7115.c | 12 ++-- 1 file

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-09 Thread Kuan-Wei Chiu
On Fri, Mar 07, 2025 at 12:07:02PM -0800, H. Peter Anvin wrote: > On March 7, 2025 11:53:10 AM PST, David Laight > wrote: > >On Fri, 07 Mar 2025 11:30:35 -0800 > >"H. Peter Anvin" wrote: > > > >> On March 7, 2025 10:49:56 AM PST, Andrew Cooper > >> wrote: > >> >> (int)true most definitely is g

[PATCH v3 06/16] serial: max3100: Replace open-coded parity calculation with parity8()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change parity8(c) to !!parity8(c

[PATCH v3 10/16] wifi: brcm80211: Replace open-coded parity calculation with parity32()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu Acked-by: Arend van Spriel --- .../wireless/broadcom

[PATCH v3 11/16] drm/bridge: dw-hdmi: Replace open-coded parity calculation with parity32()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change parity32(sample) to !!parity32

[PATCH v3 01/16] bitops: Change parity8() return type to bool

2025-03-06 Thread Kuan-Wei Chiu
-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- include/linux/bitops.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index c1cb53cf2f0f..44e5765b8bec 100644 --- a/include/linux/bitops.h +++ b/include/linux

[PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-06 Thread Kuan-Wei Chiu
-coded parity calculations with the new helpers, reducing code duplication and improving maintainability. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- In v3, I use parityXX() instead of the parity() macro since the parity() macro may generate suboptimal

[PATCH v3 02/16] bitops: Add parity16(), parity32(), and parity64() helpers

2025-03-06 Thread Kuan-Wei Chiu
: Kuan-Wei Chiu --- include/linux/bitops.h | 42 ++ 1 file changed, 42 insertions(+) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 44e5765b8bec..906757e1ddf8 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -260,6

[PATCH v3 03/16] media: media/test_drivers: Replace open-coded parity calculation with parity8()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/test-drivers/vivid/vivid-vbi-gen.c | 8

[PATCH v3 04/16] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity8()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/pci/cx18/cx18-av-vbi.c | 12 ++-- 1

[PATCH v3 08/16] Input: joystick - Replace open-coded parity calculation with parity32()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change condition if(parity32(pkt) == 1

[PATCH v3 09/16] net: ethernet: oa_tc6: Replace open-coded parity calculation with parity32()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/oa_tc6.c | 19 +++ 1

[PATCH v3 12/16] mtd: ssfdc: Replace open-coded parity calculation with parity32()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change variable 'parity' type f

[PATCH v3 13/16] fsi: i2cr: Replace open-coded parity calculation with parity32()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change parity ^= parity32(v) to parity

[PATCH v3 16/16] nfp: bpf: Replace open-coded parity calculation with parity64()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- Changes in v3: - Change parity64() to !!parity64

[PATCH v3 15/16] Input: joystick - Replace open-coded parity calculation with parity64()

2025-03-06 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/input/joystick/sidewinder.c | 24

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-11 Thread Kuan-Wei Chiu
Hi Yury, On Fri, Mar 07, 2025 at 10:55:13AM -0500, Yury Norov wrote: > On Fri, Mar 07, 2025 at 07:57:48AM +0100, Jiri Slaby wrote: > > On 06. 03. 25, 17:25, Kuan-Wei Chiu wrote: > > > Several parts of the kernel contain redundant implementations of parity > > > ca

[PATCH v2 13/18] mtd: ssfdc: Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/mtd/ssfdc.c | 17 ++--- 1 file

[PATCH v2 09/18] Input: joystick - Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/input/joystick/grip_mp.c | 17

[PATCH v2 05/18] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity8()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/pci/cx18/cx18-av-vbi.c | 12 ++-- 1

[PATCH v2 14/18] fsi: i2cr: Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/fsi/fsi-master-i2cr.c | 10 ++ 1 file

[PATCH v2 11/18] wifi: brcm80211: Replace open-coded parity calculation with parity32()

2025-03-01 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu Acked-by: Arend van Spriel --- .../wireless/broadcom

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-12 Thread Kuan-Wei Chiu
On Wed, Mar 12, 2025 at 11:51:12AM -0400, Yury Norov wrote: > On Tue, Mar 11, 2025 at 03:24:14PM -0700, H. Peter Anvin wrote: > > On March 11, 2025 3:01:30 PM PDT, Yury Norov wrote: > > >On Sun, Mar 09, 2025 at 11:48:26PM +0800, Kuan-Wei Chiu wrote: > > >> On Fri, Ma

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-13 Thread Kuan-Wei Chiu
On Thu, Mar 13, 2025 at 12:29:13AM +0800, Kuan-Wei Chiu wrote: > On Wed, Mar 12, 2025 at 11:51:12AM -0400, Yury Norov wrote: > > On Tue, Mar 11, 2025 at 03:24:14PM -0700, H. Peter Anvin wrote: > > > On March 11, 2025 3:01:30 PM PDT, Yury Norov wrote: > > > >On S

[PATCH 17/17] nfp: bpf: Replace open-coded parity calculation with parity64()

2025-02-23 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 7

[PATCH 11/17] wifi: brcm80211: Replace open-coded parity calculation with parity32()

2025-02-23 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- .../wireless/broadcom/brcm80211/brcmsmac/dma.c | 16

[PATCH 09/17] Input: joystick - Replace open-coded parity calculation with parity32()

2025-02-23 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/input/joystick/grip_mp.c | 17

[PATCH 05/17] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity8()

2025-02-23 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/pci/cx18/cx18-av-vbi.c | 12 ++-- 1

[PATCH 00/17] Introduce and use generic parity32/64 helper

2025-02-23 Thread Kuan-Wei Chiu
replace open-coded parity calculations with the new helpers, reducing code duplication and improving maintainability. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu Kuan-Wei Chiu (17): bitops: Add generic parity calculation for u32 bitops: Add generic

[PATCH 13/17] mtd: ssfdc: Replace open-coded parity calculation with parity32()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/mtd/ssfdc.c | 17 ++--- 1 file

[PATCH 10/17] net: ethernet: oa_tc6: Replace open-coded parity calculation with parity32()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/net/ethernet/oa_tc6.c | 19 +++ 1

[PATCH 08/17] lib/bch: Replace open-coded parity calculation with parity32()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- lib/bch.c | 14 +- 1 file changed, 1

[PATCH 01/17] bitops: Add generic parity calculation for u32

2025-02-24 Thread Kuan-Wei Chiu
Several parts of the kernel open-code parity calculations using different methods. Add a generic parity32() helper implemented with the same efficient approach as parity8(). Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- include/linux/bitops.h | 21

[PATCH 15/17] fsi: i2cr: Replace open-coded parity calculation with parity64()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/fsi/fsi-master-i2cr.c | 8 +--- 1 file

[PATCH 03/17] x86: Replace open-coded parity calculation with parity8()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- arch/x86/kernel/bootflag.c | 18 +++--- 1 file

[PATCH 06/17] media: saa7115: Replace open-coded parity calculation with parity8()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/i2c/saa7115.c | 12 ++-- 1 file

[PATCH 14/17] fsi: i2cr: Replace open-coded parity calculation with parity32()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/fsi/fsi-master-i2cr.c | 10 ++ 1 file

[PATCH 16/17] Input: joystick - Replace open-coded parity calculation with parity64()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity64() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/input/joystick/sidewinder.c | 24

[PATCH 12/17] drm/bridge: dw-hdmi: Replace open-coded parity calculation with parity32()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity32() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 8

[PATCH 02/17] bitops: Add generic parity calculation for u64

2025-02-24 Thread Kuan-Wei Chiu
Several parts of the kernel open-code parity calculations using different methods. Add a generic parity64() helper implemented with the same efficient approach as parity8(). Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- include/linux/bitops.h | 22

[PATCH 07/17] serial: max3100: Replace open-coded parity calculation with parity8()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/tty/serial/max3100.c | 3 ++- 1 file changed, 2

[PATCH 04/17] media: media/test_drivers: Replace open-coded parity calculation with parity8()

2025-02-24 Thread Kuan-Wei Chiu
Refactor parity calculations to use the standard parity8() helper. This change eliminates redundant implementations and improves code efficiency. Co-developed-by: Yu-Chun Lin Signed-off-by: Yu-Chun Lin Signed-off-by: Kuan-Wei Chiu --- drivers/media/test-drivers/vivid/vivid-vbi-gen.c | 8

Re: [PATCH 02/17] bitops: Add generic parity calculation for u64

2025-02-26 Thread Kuan-Wei Chiu
Hi Jiri, On Wed, Feb 26, 2025 at 08:14:14AM +0100, Jiri Slaby wrote: > On 25. 02. 25, 14:29, Kuan-Wei Chiu wrote: > > > +#define parity(val) \ > > > +({ \ &

Re: [PATCH 02/17] bitops: Add generic parity calculation for u64

2025-02-25 Thread Kuan-Wei Chiu
On Tue, Feb 25, 2025 at 09:29:51PM +0800, Kuan-Wei Chiu wrote: > Hi Yury, > > On Mon, Feb 24, 2025 at 02:27:03PM -0500, Yury Norov wrote: > > On Mon, Feb 24, 2025 at 12:42:02AM +0800, Kuan-Wei Chiu wrote: > > > Several parts of the kernel open-code parity calculatio

Re: [PATCH 02/17] bitops: Add generic parity calculation for u64

2025-02-25 Thread Kuan-Wei Chiu
Hi Yury, On Mon, Feb 24, 2025 at 02:27:03PM -0500, Yury Norov wrote: > On Mon, Feb 24, 2025 at 12:42:02AM +0800, Kuan-Wei Chiu wrote: > > Several parts of the kernel open-code parity calculations using > > different methods. Add a generic parity64() helper implemented with the >

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-04-04 Thread Kuan-Wei Chiu
On Thu, Apr 03, 2025 at 12:14:04PM -0400, Yury Norov wrote: > On Thu, Apr 03, 2025 at 10:39:03PM +0800, Kuan-Wei Chiu wrote: > > On Tue, Mar 25, 2025 at 12:43:25PM -0700, H. Peter Anvin wrote: > > > On 3/23/25 08:16, Kuan-Wei Chiu wrote: > > > > > >

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-04-04 Thread Kuan-Wei Chiu
Hi Jeremy, On Fri, Apr 04, 2025 at 10:51:55AM +0800, Jeremy Kerr wrote: > Hi Yuri & Kuan-Wei: > > > Thank you for sharing your opinion on this fixed parity(). Your > > arguments may or may not be important, depending on what existing > > users actually need. Unfortunately, Kuan-Wei didn't collect

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-29 Thread Kuan-Wei Chiu
On Mon, Mar 24, 2025 at 11:53:35AM -0400, Yury Norov wrote: > On Sun, Mar 23, 2025 at 03:40:20PM -0700, H. Peter Anvin wrote: > > On March 23, 2025 8:16:24 AM PDT, Kuan-Wei Chiu > > wrote: > > >On Thu, Mar 13, 2025 at 03:41:49PM +0800, Kuan-Wei Chiu wrote: > > &g

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-04-03 Thread Kuan-Wei Chiu
On Thu, Apr 03, 2025 at 12:14:04PM -0400, Yury Norov wrote: > On Thu, Apr 03, 2025 at 10:39:03PM +0800, Kuan-Wei Chiu wrote: > > On Tue, Mar 25, 2025 at 12:43:25PM -0700, H. Peter Anvin wrote: > > > On 3/23/25 08:16, Kuan-Wei Chiu wrote: > > > > > >

  1   2   >