Re: [PATCH v1 3/5] fbtft: Drop useless #ifdef CONFIG_OF and dead code

2019-11-21 Thread Andy Shevchenko
On Wed, Nov 20, 2019 at 04:04:17PM +0100, Noralf Trønnes wrote: > Den 20.11.2019 15.43, skrev Noralf Trønnes: > > Den 20.11.2019 10.57, skrev Andy Shevchenko: > >> First of all there is no need to guard GPIO request by CONFIG_OF. > >> It works for everybody indepen

[PATCH v1 5/5] fbtft: Drop OF dependency

2019-11-21 Thread Andy Shevchenko
Now, since driver became OF independent, no need to keep OF dependency. Signed-off-by: Andy Shevchenko --- drivers/staging/fbtft/Kconfig | 2 +- drivers/staging/fbtft/fbtft.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging

[PATCH v1 1/5] fbtft: Make sure string is NULL terminated

2019-11-21 Thread Andy Shevchenko
dev->driver->name, 16); | ^~~~ Later on the copy is being used with the assumption to be NULL terminated. Make sure string is NULL terminated by switching to snprintf(). Signed-off-by: Andy Shevchenko --- drivers/staging/fbtft/fbtft-core.c | 2 +

Re: [PATCH 0/2] drm/i915/vlv_dsi: Control panel and backlight enable GPIOs on BYT

2019-11-30 Thread Andy Shevchenko
I get your ack > for merging the pinctrl-baytrail patch throught the drm-inteol tree? I'm not okay with this. I will tell more next week how I see this to be implemented in a better way. Happy Black Friday! :-) -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2] pinctrl: baytrail: Add GPIO lookup and pinctrl-map for i915 DSI panel ctrl

2019-12-03 Thread Andy Shevchenko
ling us that the pin should > definitely be muxed to the PWM controller is the VBT to which the PWM > driver does not have access. My concern here, as one of Linus', is a pollution the driver with board code. Aren't we able to split this to a separate file under PD

Re: [PATCH] drm/gma500: Pass GPIO for Intel MID using descriptors

2019-12-09 Thread Andy Shevchenko
tidy up my GPIO corner. What a nice clean up! Reviewed-by: Andy Shevchenko > > Cc: Patrik Jakobsson > Cc: Daniel Stone > Cc: Daniel Vetter > Cc: Andy Shevchenko > Signed-off-by: Linus Walleij > --- > If someone can test this on the target platform I'd be > hap

Re: [PATCH v1] backlight: lm3630a: Switch to use fwnode_property_count_uXX()

2019-09-02 Thread Andy Shevchenko
On Mon, Aug 12, 2019 at 09:04:44AM +0100, Lee Jones wrote: > On Tue, 23 Jul 2019, Andy Shevchenko wrote: > > > Use use fwnode_property_count_uXX() directly, that makes code neater. > > > > Signed-off-by: Andy Shevchenko > > --- > > drivers/video/backli

Re: [PATCH 00/11] Add support for software nodes to gpiolib

2019-09-11 Thread Andy Shevchenko
aybe -rc8 so that it can be pulled into > individual subsystems so that patches switching various drivers to > fwnode_gpiod_get_index() could be applied. FWIW, Reviewed-by: Andy Shevchenko for patches 1-8 after addressing minor issues. I'll review the rest later on. > &g

Re: [PATCH v2 0/2] allow simple{fb,drm} drivers to be used on non-x86 EFI platforms

2021-06-04 Thread Andy Shevchenko
ry being smart [1]. At least it works for me in 99% of the cases. Otherwise I add manually --cc or other related options. [1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh Feel free to modify (patches also are warmly welcome!). -- With Best Regards, Andy Shevchenko

Re: [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework

2021-06-14 Thread Andy Shevchenko
++-- > drivers/spi/spi-ep93xx.c | 4 ++-- > drivers/video/fbdev/ep93xx-fb.c| 4 ++-- > sound/soc/cirrus/ep93xx-i2s.c | 12 ++-- > 7 files changed, 24 insertions(+), 24 deletions(-) > > -- > 2.32.0 > > -- With Best Regards, Andy Shevchenko

Re: [PATCH 3/3] Replace for_each_*_bit_from() with for_each_*_bit() where appropriate

2021-06-19 Thread Andy Shevchenko
, &gpio_status, mask, LTC2992_GPIO_NR); (Good to split sometimes :-) -- With Best Regards, Andy Shevchenko

Re: [PATCH 2/3] find: micro-optimize for_each_{set,clear}_bit()

2021-06-19 Thread Andy Shevchenko
n > save few lines of I-cache by not using find_first_bit(). Any number available? -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/3] include/linux: move for_each_bit() macros from bitops.h to find.h

2021-06-19 Thread Andy Shevchenko
On Fri, Jun 18, 2021 at 12:57:33PM -0700, Yury Norov wrote: > for_each_bit() macros depend on find_bit() machinery, and so the > proper place for them is the find.h header. Fine with me. Reviewed-by: Andy Shevchenko > Signed-off-by: Yury Norov > --- > include/linu

Re: [PATCH 3/3] Replace for_each_*_bit_from() with for_each_*_bit() where appropriate

2021-06-19 Thread Andy Shevchenko
On Sat, Jun 19, 2021 at 01:49:58PM +0300, Andy Shevchenko wrote: > On Fri, Jun 18, 2021 at 12:57:35PM -0700, Yury Norov wrote: > > A couple of kernel functions call for_each_*_bit_from() with start > > bit equal to 0. Replace them with for_each_*_bit(). > > > > No fu

Re: linux-next: manual merge of the usb tree with the drm-intel-fixes tree

2023-01-31 Thread Andy Shevchenko
can carry the fix as necessary. This is now fixed as far as linux-next > is concerned, but any non trivial conflicts should be mentioned to your > upstream maintainer when your tree is submitted for merging. You may > also want to consider cooperating with the maintainer of the conflicting > tree to minimise any particularly complex conflicts. -- With Best Regards, Andy Shevchenko

Re: [PATCH v11 3/9] drm/display: Add Type-C switch helpers

2023-02-06 Thread Andy Shevchenko
't checked the rest of the patches, though), perhaps #define fwnode_for_each_typec_mode_switch(port, sw) \ fwnode_for_each_child_node(port, sw)\ if (!fwnode_property_present(sw, "mode-switch")) {} else ? -- With Best Regards, Andy Shevchenko

Re: [PATCH v11 5/9] drm/bridge: anx7625: Check for Type-C during panel registration

2023-02-06 Thread Andy Shevchenko
of_node_put(sw); > + return 0; > + } > + } -- With Best Regards, Andy Shevchenko

Re: [PATCH v11 6/9] drm/bridge: anx7625: Register Type C mode switches

2023-02-06 Thread Andy Shevchenko
| num_lanes > 2) { > + dev_err(dev, > + "Error on getting data lanes count from %pfwP: > %d\n", > + fwnode, num_lanes); > + ret = num_lanes; ret == 0?! Carefully consider all cases. > + goto unregister_mux; > + } -- With Best Regards, Andy Shevchenko

Re: [PATCH v11 9/9] drm/bridge: it6505: Register Type C mode switches

2023-02-06 Thread Andy Shevchenko
-C > connector, which ends up updating the lane swap registers of the it6505 > chip. Same / similar comments as per previous patch. -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 01/10] device property: Add remote endpoint to devcon matcher

2023-02-21 Thread Andy Shevchenko
es array. > * If @matches is NULL @matches_len is ignored and the total number of > resolved > * matches is returned. Ditto. -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 07/10] drm/bridge: anx7625: Register Type C mode switches

2023-02-21 Thread Andy Shevchenko
TATION_REVERSE : TYPEC_ORIENTATION_NORMAL; > + ctx->port_data[i].dp_connected = false; > + } > + complete_all(&ctx->mux_register); > + > + return 0; > + > +unregister_mux: > + complete_all(&ctx->mux_register); > + anx7625_unregister_typec_switches(ctx); > + return ret; > +} -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 06/10] drm/bridge: Remove redundant i2c_client in anx7625/it6505

2023-02-21 Thread Andy Shevchenko
On Tue, Feb 21, 2023 at 05:50:50PM +0800, Pin-yen Lin wrote: > These two drivers embed a i2c_client in there private driver data, but > only strict device is actually needed. Replace the i2c_client reference > with a struct device one. LGTM, Reviewed-by: Andy Shevchenko > Signed-off

Re: [PATCH v12 03/10] drm/display: Add Type-C switch helpers

2023-02-21 Thread Andy Shevchenko
for_each_if(fwnode_property_present((sw), "mode-switch")) Please don't use fwnode namespace (see above), something like #define for_each_typec_mode_switch_node(port, sw) \ ... -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 05/10] drm/bridge: anx7625: Check for Type-C during panel registration

2023-02-21 Thread Andy Shevchenko
) { > + fwnode_handle_put(fwnode); > + return 0; > + } With the proposed count API: unsigned int count; ... port_node = ... count = typec_mode_switch_node_count(&port_node->fwnode); if (count == 0) return 0; -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 10/10] drm/bridge: it6505: Register Type C mode switches

2023-02-21 Thread Andy Shevchenko
dev_err(dev, > + "Error on getting data lanes count from %pfwP: > %d\n", > + fwnode, num_lanes); > + ret = num_lanes; > + goto unregister_mux; > + } Same two comments as per previous patch of similar semantics. -- With Best Regards, Andy Shevchenko

Re: [PATCH v12 03/10] drm/display: Add Type-C switch helpers

2023-02-22 Thread Andy Shevchenko
On Wed, Feb 22, 2023 at 04:53:41PM +0800, Pin-yen Lin wrote: > On Tue, Feb 21, 2023 at 7:48 PM Andy Shevchenko > > On Tue, Feb 21, 2023 at 05:50:47PM +0800, Pin-yen Lin wrote: ... > > > #include > > > #include > > > +#include > > > >

Re: [PATCH v13 01/10] device property: Add remote endpoint to devcon matcher

2023-03-06 Thread Andy Shevchenko
cher code to evaluate those for a match too, instead > of only looking at the remote parent devices. This is required when a > device supports two mode switches in its endpoints, so we can't simply > register the mode switch with the parent node. OK! Reviewed-by: Andy Shevchenko > Si

Re: [PATCH v13 03/10] drm/display: Add Type-C switch helpers

2023-03-06 Thread Andy Shevchenko
gt; switch_desc->num_typec_switches, > + sizeof(struct > drm_dp_typec_port_data), > + GFP_KERNEL); > + if (!switch_desc->typec_ports) > + return -ENOMEM; How often this function _can_ be called during the runtime? If it's _possible_ to call it infinite times, consider *not* using devm. -- With Best Regards, Andy Shevchenko

Re: [PATCH v13 05/10] drm/bridge: anx7625: Check for Type-C during panel registration

2023-03-06 Thread Andy Shevchenko
Do you need to drop reference count here? (I don't know myself, so, please check this) If no, patch LGTM. > + if (count) > + return 0; -- With Best Regards, Andy Shevchenko

Re: [PATCH v13 07/10] drm/bridge: anx7625: Register Type C mode switches

2023-03-06 Thread Andy Shevchenko
o unregister_mux; > + } ... > + ctx->port_data[i].orientation = (dp_lanes[0] / 2 == 0) ? > + TYPEC_ORIENTATION_REVERSE : TYPEC_ORIENTATION_NORMAL; I believe that this is an error prone check, you should rather do the opposite, i.e. ' % 2 == 0'. -- With Best Regards, Andy Shevchenko

Re: [PATCH v13 10/10] drm/bridge: it6505: Register Type C mode switches

2023-03-06 Thread Andy Shevchenko
istered.\n"); > + return -EINVAL; > + } > + } Perhaps if (ret != -ENODEV) dev_warn(dev, "Didn't register Type-C switches, err: %d\n", ret); if (ret && !it6505->extcon) { dev_err(dev, "Both extcon and typec-switch are not registered.\n"); return ret; } ? -- With Best Regards, Andy Shevchenko

Re: [PATCH] backlight: apple_bl: Use acpi_video_get_backlight_type()

2023-03-07 Thread Andy Shevchenko
on the kernel >commandline. ... > + depends on ACPI_VIDEO=n || ACPI_VIDEO I'm wondering if "imply ACPI_VIDEO" (i.o.w. weak dependency) is what suitable here. -- With Best Regards, Andy Shevchenko

Re: [PATCH v13 03/10] drm/display: Add Type-C switch helpers

2023-03-08 Thread Andy Shevchenko
On Wed, Mar 08, 2023 at 06:20:14PM +0800, Pin-yen Lin wrote: > On Mon, Mar 6, 2023 at 7:49 PM Andy Shevchenko > > On Fri, Mar 03, 2023 at 10:33:43PM +0800, Pin-yen Lin wrote: ... > > > + switch_desc->typec_ports = devm_kcalloc(dev, > > > s

Re: [PATCH v13 10/10] drm/bridge: it6505: Register Type C mode switches

2023-03-08 Thread Andy Shevchenko
On Wed, Mar 08, 2023 at 09:51:19PM +0800, Pin-yen Lin wrote: > On Mon, Mar 6, 2023 at 8:03 PM Andy Shevchenko > wrote: > > On Fri, Mar 03, 2023 at 10:33:50PM +0800, Pin-yen Lin wrote: ... > > > + it6505->port_data[i].lane_swap = (dp_lanes[0] / 2 =

Re: [PATCH v10 0/9] Register Type-C mode-switch in DP bridge endpoints

2023-01-12 Thread Andy Shevchenko
kernel.org. It's really easy for the experienced maintainer to catch up the whole thread. Putting _all_ people on all patches may be an overkill. What people should really get is the cover letter (assuming that it explains well the structure of the series). The rest depends. -- With Best Regards, Andy Shevchenko

Re: [PATCH v10 3/9] drm/display: Add Type-C switch helpers

2023-01-13 Thread Andy Shevchenko
node->name, ret); > > fwnode_get_name(fwnode), ret); Or even %pfwP ? ... > > + snprintf(name, sizeof(name), "%s-%u", node->name, port_num); > > snprintf(name, sizeof(name), "%s-%u", fwnode_get_name(fwnode), > port_num); Ditto. -- With Best Regards, Andy Shevchenko

Re: [PATCH v10 1/9] device property: Add remote endpoint to devcon matcher

2023-01-13 Thread Andy Shevchenko
t break-ing/continue-ing here, > and fwnode_handle_put(node) is called latter in the loop [1][2] > > BR, > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/property.c#n1256 > [2] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/property.c#n1261 I'm really puzzled what do you mean by all this. Sakari is right, btw. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 1/5] drm/i915: Fix request locking during error capture & debugfs dump

2023-01-18 Thread Andy Shevchenko
> Cc: Rodrigo Vivi > Cc: Tvrtko Ursulin > Cc: Daniele Ceraolo Spurio > Cc: Andrzej Hajda > Cc: Chris Wilson > Cc: Matthew Auld > Cc: Matt Roper > Cc: Umesh Nerlige Ramappa > Cc: Michael Cheng > Cc: Lucas De Marchi > Cc: Tejas Upadhyay > Cc: Andy She

Re: [PATCH v2 1/5] drm/i915: Fix request locking during error capture & debugfs dump

2023-01-18 Thread Andy Shevchenko
On Wed, Jan 18, 2023 at 09:34:47AM -0800, John Harrison wrote: > On 1/18/2023 00:29, Andy Shevchenko wrote: > > On Tue, Jan 17, 2023 at 01:36:26PM -0800, john.c.harri...@intel.com wrote: > > > From: John Harrison > > > > > > When GuC support was added to e

Re: [PATCH v3 1/6] drm/i915: Fix request locking during error capture & debugfs dump

2023-01-19 Thread Andy Shevchenko
try_is_head(...)) And because requests can only be messed up with the guc_state itself, I think you don't need to perform the above check under spinlock, so it's safe. > + if (found) { > intel_engine_set_hung_context(engine, ce); -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 1/6] drm/i915: Fix request locking during error capture & debugfs dump

2023-01-21 Thread Andy Shevchenko
On Fri, Jan 20, 2023 at 03:06:02PM -0800, John Harrison wrote: > On 1/19/2023 07:16, Andy Shevchenko wrote: > > On Wed, Jan 18, 2023 at 10:49:55PM -0800, john.c.harri...@intel.com wrote: ... > > > + found = false; > > > + sp

Re: [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Andy Shevchenko
at'd work, but again it's not more clear. Authors here are going for > a 24-bit number, and masking seems like a clear way to express that. We have some 24-bit APIs (and 48-bit) already in kernel, why not to have get_random_u24() ? -- With Best Regards, Andy Shevchenko

Re: [f2fs-dev] [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Andy Shevchenko
. I'll move these to patch #1. I believe coccinelle is able to handle this kind of code as well, so Kees' proposal to use it seems more plausible since it's less error prone and more flexible / powerful. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/5] treewide: use prandom_u32_max() when possible

2022-10-06 Thread Andy Shevchenko
e stuff can > have a chance to flow through subsystem trees. +1 to all arguments for the splitting. I looked a bit into the code I have the interest to, but I won't spam people with not-so-important questions / comments / tags, etc. -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread Andy Shevchenko
gt; expression add_one.RESULT; > >> identifier FUNC; > >> @@ > >> > >> - (FUNC()@p & (LITERAL)) > >> + prandom_u32_max(RESULT) > > > >Oh that's pretty cool. I can do the saturation check in python, since > >`value` holds the parsed result. Neat. > > It is (at least how I have it here) just the string, so YMMV. ... > >Thanks a bunch for the guidance. > > Sure thing! I was pleased to figure out how to do the python bit. I believe it can be optimized -- With Best Regards, Andy Shevchenko

Re: [PATCH v2] drm: Remove drm_mode_config::fb_base

2022-10-18 Thread Andy Shevchenko
gt;mode_config.fb_base = pci_resource_start(pdev, 0); Unused pdev. > if (ast->chip == AST2100 || > ast->chip == AST2200 || I suggest to compile with `make W=1 C=1` on your side before sending v3 and address all compiler complaints. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2] drm: Remove drm_mode_config::fb_base

2022-10-18 Thread Andy Shevchenko
On Tue, Oct 18, 2022 at 08:26:17PM +, Zack Rusin wrote: > > On Oct 18, 2022, at 4:20 PM, Andy Shevchenko > > wrote: > > On Tue, Oct 18, 2022 at 12:11:51PM -0400, Zack Rusin wrote: > >> From: Zack Rusin > >> > >> v2: Thomas and Laurent no

Re: [PATCH v5 01/10] gna: add PCI driver module

2022-10-20 Thread Andy Shevchenko
_SPRD) += sprd/ > +obj-$(CONFIG_DRM_GNA) += gna/ Ditto. ... > +config DRM_GNA > + tristate "Intel(R) Gaussian & Neural Accelerator (Intel(R) GNA)" > + depends on X86 && PCI No compile test for the rest of possible options? -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 02/10] gna: add GNA DRM device

2022-10-20 Thread Andy Shevchenko
"20211201" Really? ... > +#include Are you sure? > +struct gna_dev_info { > + u32 hwid; > + u32 num_pagetables; > + u32 num_page_entries; > + u32 max_layer_count; > + u64 max_hw_mem; > +}; -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 04/10] gna: initialize MMU

2022-10-20 Thread Andy Shevchenko
ave a comma at the end. Same for all similar declarations. > +}; ... > +#define INTEL_GNA_DEVICE(hwid, info) \ > + { PCI_VDEVICE(INTEL, hwid), (kernel_ulong_t)(info) } Drop this and use PCI_DEVICE_DATA() instead. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 04/10] gna: initialize MMU

2022-10-20 Thread Andy Shevchenko
On Thu, Oct 20, 2022 at 10:00 PM Andy Shevchenko wrote: > On Thu, Oct 20, 2022 at 8:57 PM Maciej Kwapulinski > wrote: ... > > + desc_size = round_up(gna_priv->info.desc_info.desc_size, PAGE_SIZE); > > PFN_UP() ? Or PFN_ALIGN() ? -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 06/10] gna: add GNA_GEM_NEW and GNA_GEM_FREE ioctls

2022-10-20 Thread Andy Shevchenko
t; + struct drm_gem_shmem_object base; > + > + uint32_t handle; Not u32 or __u32? Is it a subsystem requirement to have uint32_t? Or your driver, then why are you not using similar types elsewhere? > +}; -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 00/10] Driver of Intel(R) Gaussian & Neural Accelerator

2022-10-20 Thread Andy Shevchenko
ace all those dev_dbg():s by trace events/points? -- With Best Regards, Andy Shevchenko

[PATCH v2 2/4] usb: gadget: hid: Convert to use list_count()

2022-11-14 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Uilise it. Signed-off-by: Andy Shevchenko --- v2: no change drivers/usb/gadget/legacy/hid.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/legacy/hid.c b

[PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-14 Thread Andy Shevchenko
Some of the existing users, and definitely will be new ones, want to count existing nodes in the list. Provide a generic API for that by moving code from i915 to list.h. Signed-off-by: Andy Shevchenko --- v2: dropped the duplicate code in i915 (LKP) drivers/gpu/drm/i915/gt/intel_engine_cs.c

[PATCH v2 4/4] xhci: Convert to use list_count()

2022-11-14 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Uilise it. Signed-off-by: Andy Shevchenko --- v2: no change drivers/usb/host/xhci-ring.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers

[PATCH v2 3/4] usb: gadget: udc: bcm63xx: Convert to use list_count()

2022-11-14 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Uilise it. Signed-off-by: Andy Shevchenko --- v2: no change drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/udc

Re: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-14 Thread Andy Shevchenko
ove. However, I'm fine with the inline. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 2/4] usb: gadget: hid: Convert to use list_count()

2022-11-22 Thread Andy Shevchenko
On Mon, Nov 14, 2022 at 04:15:35PM -0300, Fabio Estevam wrote: > On Mon, Nov 14, 2022 at 1:22 PM Andy Shevchenko > wrote: > > > > The list API now provides the list_count() to help with counting > > existing nodes in the list. Uilise it. > > s/Uilise/Utilise Fixed

Re: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-22 Thread Andy Shevchenko
On Tue, Nov 15, 2022 at 05:46:28PM +0200, Jani Nikula wrote: > On Mon, 14 Nov 2022, Andy Shevchenko > wrote: > > Some of the existing users, and definitely will be new ones, want to > > count existing nodes in the list. Provide a generic API for that by > > moving

[PATCH v3 1/4] i915: Move list_count() to list.h for broader use

2022-11-22 Thread Andy Shevchenko
Some of the existing users, and definitely will be new ones, want to count existing nodes in the list. Provide a generic API for that by moving code from i915 to list.h. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- v3: added tag (Jani), changed to be static inline (Mike) v2: dropped

[PATCH v3 3/4] usb: gadget: udc: bcm63xx: Convert to use list_count()

2022-11-22 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v3: no change v2: no change drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH v3 2/4] usb: gadget: hid: Convert to use list_count()

2022-11-22 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v3: fixed typo in the commit message (Fabio) v2: no change drivers/usb/gadget/legacy/hid.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions

[PATCH v3 4/4] xhci: Convert to use list_count()

2022-11-22 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v3: no change v2: no change drivers/usb/host/xhci-ring.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci

Re: [PATCH v3 1/4] i915: Move list_count() to list.h for broader use

2022-11-22 Thread Andy Shevchenko
On Tue, Nov 22, 2022 at 05:35:13PM +0200, Andy Shevchenko wrote: > Some of the existing users, and definitely will be new ones, want to > count existing nodes in the list. Provide a generic API for that by > moving code from i915 to list.h. Sorry for the noise, forgot to squash one pa

[PATCH v4 4/4] xhci: Convert to use list_count()

2022-11-23 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko Acked-by: Mathias Nyman --- v4: added tag (Mathias) v3: no change v2: no change drivers/usb/host/xhci-ring.c | 7 ++- 1 file changed, 2 insertions(+), 5

[PATCH v4 1/4] i915: Move list_count() to list.h for broader use

2022-11-23 Thread Andy Shevchenko
Some of the existing users, and definitely will be new ones, want to count existing nodes in the list. Provide a generic API for that by moving code from i915 to list.h. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula --- v4: fixed prototype when converting to static inline v3: added tag

[PATCH v4 3/4] usb: gadget: udc: bcm63xx: Convert to use list_count()

2022-11-23 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v4: no change v3: no change v2: no change drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff

[PATCH v4 2/4] usb: gadget: hid: Convert to use list_count()

2022-11-23 Thread Andy Shevchenko
The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v4: no change v3: fixed typo in the commit message (Fabio) v2: no change drivers/usb/gadget/legacy/hid.c | 7 ++- 1 file changed, 2 insertions(+), 5

Re: [PATCH v6 5/7] drm/bridge: anx7625: Register Type C mode switches

2022-11-24 Thread Andy Shevchenko
gt; + GFP_KERNEL); > + if (!ctx->typec_ports) > + return -ENOMEM; ... > +struct anx7625_port_data { > + bool dp_connected; You can save some bytes on some architectures if move this to be last field. > + struct typec_mux_dev *typec_mux; > + struct anx7625_data *ctx; > +}; -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 7/7] drm/bridge: it6505: Register Type C mode switches

2022-11-24 Thread Andy Shevchenko
p;& port_num != dp_lanes[i] / 2) { > + dev_err(dev, "Invalid data lane numbers\n"); > + return -EINVAL; > + } As per previous patch comments. > + port_num = dp_lanes[i] / 2; > + } The above seems like tons of duplicating code that drivers need to implement. Can we shrink that burden by adding some library functions? -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 2/7] platform/chrome: cros_ec_typec: Purge blocking switch devlinks

2022-11-24 Thread Andy Shevchenko
these to avoid a deadlock in switch probe (the > switch mistakenly > + * assumes the connector is a supplier). > + */ A bit too long lines... > + if (dev->of_node) Why do you need this check? > + device_for_each_child_node(dev, fwnode) > + fw_devlink_purge_absent_suppliers(fwnode); -- With Best Regards, Andy Shevchenko

[PATCH v1 1/2] fbdev: ssd1307fb: Drop optional dependency

2022-11-01 Thread Andy Shevchenko
ivers that select GPIOLIB. Fixes: a2ed00da5047 ("drivers/video: add support for the Solomon SSD1307 OLED Controller") Signed-off-by: Andy Shevchenko --- drivers/video/fbdev/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfi

[PATCH v1 2/2] fbdev: ssd1307fb: Drop duplicate NULL checks for PWM APIs

2022-11-01 Thread Andy Shevchenko
pwm_disable() and pwm_put() are NULL-aware, no need to duplicate the check in the caller. Signed-off-by: Andy Shevchenko --- drivers/video/fbdev/ssd1307fb.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev

[PATCH v5 4/4] xhci: Convert to use list_count_nodes()

2022-11-30 Thread Andy Shevchenko
The list API provides the list_count_nodes() to help with counting existing nodes in the list. Utilise it. Acked-by: Mathias Nyman Signed-off-by: Andy Shevchenko --- v5: used renamed API (LKP) v4: added tag (Mathias) v3: no change v2: no change drivers/usb/host/xhci-ring.c | 7 ++- 1 file

[PATCH v5 1/4] i915: Move list_count() to list.h as list_count_nodes() for broader use

2022-11-30 Thread Andy Shevchenko
Some of the existing users, and definitely will be new ones, want to count existing nodes in the list. Provide a generic API for that by moving code from i915 to list.h. Reviewed-by: Lucas De Marchi Acked-by: Jani Nikula Signed-off-by: Andy Shevchenko --- v5: added tag (Lucas), renamed API to

[PATCH v5 2/4] usb: gadget: hid: Convert to use list_count_nodes()

2022-11-30 Thread Andy Shevchenko
The list API provides the list_count_nodes() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v5: used renamed API (LKP) v4: no change v3: fixed typo in the commit message (Fabio

[PATCH v5 3/4] usb: gadget: udc: bcm63xx: Convert to use list_count_nodes()

2022-11-30 Thread Andy Shevchenko
The list API provides the list_count_nodes() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko --- v5: used renamed API (LKP) v4: no change v3: no change v2: no change drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++ 1 file changed, 3 insertions

Re: [PATCH v5 1/4] i915: Move list_count() to list.h as list_count_nodes() for broader use

2022-12-08 Thread Andy Shevchenko
On Wed, Nov 30, 2022 at 03:48:35PM +0200, Andy Shevchenko wrote: > Some of the existing users, and definitely will be new ones, want to > count existing nodes in the list. Provide a generic API for that by > moving code from i915 to list.h. Greg, I believe this one is ready to be taken.

Re: [PATCH v5 1/4] i915: Move list_count() to list.h as list_count_nodes() for broader use

2022-12-08 Thread Andy Shevchenko
On Thu, Dec 08, 2022 at 02:14:54PM +0100, Greg Kroah-Hartman wrote: > On Thu, Dec 08, 2022 at 02:54:45PM +0200, Andy Shevchenko wrote: > > On Wed, Nov 30, 2022 at 03:48:35PM +0200, Andy Shevchenko wrote: > > > Some of the existing users, and definitely will be new ones, w

Re: [PATCH 1/5] linux/minmax.h: add non-atomic version of xchg

2022-12-09 Thread Andy Shevchenko
inux/non-atomic/xchg.h, dunno. Btw, have you looked if Ingo's gigantic series have done anything to cmpxchg.h and related headers? Maybe some ideas can be taken from there? -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/5] linux/minmax.h: add non-atomic version of xchg

2022-12-09 Thread Andy Shevchenko
On Fri, Dec 09, 2022 at 08:56:28PM +0200, Andy Shevchenko wrote: > On Fri, Dec 09, 2022 at 04:48:39PM +0100, Andrzej Hajda wrote: ... > > I hope there will be place for such tiny helper in kernel. > > Quick cocci analyze shows there is probably few thousands places > > where

Re: [PATCH v2 00/11] pwm: Allow .get_state to fail

2022-12-09 Thread Andy Shevchenko
he consumer. Instead > they now see the same as if .get_state wasn't implemented at all. I'm wondering why we didn't see a compiler warning about mistyped function prototypes in some drivers. P.S. The series is good thing to do, thank you. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 00/11] pwm: Allow .get_state to fail

2022-12-10 Thread Andy Shevchenko
On Sat, Dec 10, 2022 at 10:18:33AM +0100, Uwe Kleine-König wrote: > On Fri, Dec 09, 2022 at 11:47:54PM +0200, Andy Shevchenko wrote: > > On Wed, Nov 30, 2022 at 04:21:37PM +0100, Uwe Kleine-König wrote: ... > > I'm wondering why we didn't see a compiler warnin

Re: [PATCH v2 00/11] pwm: Allow .get_state to fail

2022-12-11 Thread Andy Shevchenko
On Sat, Dec 10, 2022 at 11:41:54PM +0100, Uwe Kleine-König wrote: > On Sat, Dec 10, 2022 at 10:57:16PM +0200, Andy Shevchenko wrote: > > On Sat, Dec 10, 2022 at 10:18:33AM +0100, Uwe Kleine-König wrote: > > > On Fri, Dec 09, 2022 at 11:47:54PM +0200, Andy Shevchenko wrote: >

Re: [PATCH 1/5] Renaming weak prng invocations - prandom_bytes_state, prandom_u32_state

2022-12-12 Thread Andy Shevchenko
_u32_state(&state.rnd_state); Isn't it too many "random":s encoded in the name? I would leave either "rng" or "[p]random". > rand %= (i + 1); > swap_free_obj(slab, i, rand); > } -- With Best Regards, Andy Shevchenko

Re: [Intel-gfx] [PATCH 1/5] linux/minmax.h: add non-atomic version of xchg

2022-12-13 Thread Andy Shevchenko
On Tue, Dec 13, 2022 at 11:09:12AM +0100, Andrzej Hajda wrote: > On 09.12.2022 19:56, Andy Shevchenko wrote: > > On Fri, Dec 09, 2022 at 04:48:39PM +0100, Andrzej Hajda wrote: ... > > > I hope there will be place for such tiny helper in kernel. > > > Quick cocci anal

Re: [PATCH 1/5] Renaming weak prng invocations - prandom_bytes_state, prandom_u32_state

2022-12-14 Thread Andy Shevchenko
> linux kernel is not for casual readers. P.S. I believe you applied a common sense and in some cases the renames are necessary. -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/5] Renaming weak prng invocations - prandom_bytes_state, prandom_u32_state

2022-12-14 Thread Andy Shevchenko
On Wed, Dec 14, 2022 at 05:53:52PM +0200, Andy Shevchenko wrote: > On Wed, Dec 14, 2022 at 04:15:49PM +0100, Eric Dumazet wrote: > > On Wed, Dec 14, 2022 at 1:34 PM Stanislaw Gruszka > > wrote: > > > On Mon, Dec 12, 2022 at 03:35:20PM +0100, Jason A. Donenfeld wrote:

Re: [PATCH 18/19] linux/include: add non-atomic version of xchg

2022-12-22 Thread Andy Shevchenko
Reviewed-by: Andy Shevchenko > Signed-off-by: Andrzej Hajda > --- > include/linux/non-atomic/xchg.h | 19 +++ > 1 file changed, 19 insertions(+) > create mode 100644 include/linux/non-atomic/xchg.h > > diff --git a/include/linux/non-atomic/xchg.h b/include/l

Re: [PATCH v3 0/3] Add generic framebuffer support to EFI earlycon driver

2022-12-28 Thread Andy Shevchenko
ed to be split up. > > > behavior on EFI systems, by selecting the mapping type > > based on if the framebuffer region intersects with system RAM. If it does, > > it's > > common sense that it should be in RAM as a whole, and so the system RAM > > mapping is > &g

Re: [PATCH v7 2/9] platform/chrome: cros_ec_typec: Purge blocking switch devlinks

2023-01-05 Thread Andy Shevchenko
if (dev->of_node) I would use if (dev_of_node(dev)), but it's up to you and maintainers. > + device_for_each_child_node(dev, fwnode) > + fw_devlink_purge_absent_suppliers(fwnode); -- With Best Regards, Andy Shevchenko

Re: [PATCH v7 3/9] drm/display: Add Type-C switch helpers

2023-01-05 Thread Andy Shevchenko
o label? ret = drm_dp_register_mode_switch(dev, sw, switch_desc, data, mux_set); if (ret) goto err_unregister_typec_switches; return 0; err_unregister_typec_switches: of_node_put(sw); drm_dp_unregister_typec_switches(switch_desc); dev_err(dev, "Failed to register mode switch: %d\n", ret); return ret; -- With Best Regards, Andy Shevchenko

Re: [PATCH 09/15] staging: fbtft: fb_ssd1351.c: Introduce backlight_is_blank()

2023-01-09 Thread Andy Shevchenko
pped - it was only used for debug. > Signed-off-by: Sam Ravnborg > Cc: Stephen Kitt > Cc: Greg Kroah-Hartman > Cc: Daniel Thompson > Cc: Andy Shevchenko > Cc: linux-fb...@vger.kernel.org Not sure why you have this (at least) explicitly mentioned as get_maintainer.pl ca

Re: [PATCH 10/15] staging: fbtft: core: Introduce backlight_is_blank()

2023-01-09 Thread Andy Shevchenko
set_value(par->gpio.led[0], polarity); ? -- With Best Regards, Andy Shevchenko

Re: [RFC DO NOT MERGE] treewide: use __xchg in most obvious places

2023-01-10 Thread Andy Shevchenko
gt; + return __xchg(&p_chain->p_prod_elem, > + (void *)(((u8 *)p_chain->p_prod_elem) + > p_chain->elem_size)); Wondering if you still need a (void *) casting after the change. Ditto for the rest of similar cases. > } ... Btw, is it done by coccinelle? If no, why not providing the script? -- With Best Regards, Andy Shevchenko

Re: [Intel-gfx] [RFC DO NOT MERGE] treewide: use __xchg in most obvious places

2023-01-10 Thread Andy Shevchenko
On Tue, Jan 10, 2023 at 01:46:37PM +0100, Andrzej Hajda wrote: > On 10.01.2023 12:07, Andy Shevchenko wrote: > > On Tue, Jan 10, 2023 at 11:53:06AM +0100, Andrzej Hajda wrote: ... > > > + return __xchg(&p_chain->p_prod_elem, > > > + (v

[PATCH v1 1/1] backlight: hx8357: Convert to agnostic GPIO API

2023-03-17 Thread Andy Shevchenko
The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib-of.c| 4 +- drivers/video/backlight/hx8357.c | 74 ++-- 2 files changed, 24 insertions(+), 54

Re: [PATCH v1 1/1] backlight: hx8357: Convert to agnostic GPIO API

2023-03-20 Thread Andy Shevchenko
On Fri, Mar 17, 2023 at 09:53:40PM +0100, Linus Walleij wrote: > On Fri, Mar 17, 2023 at 7:51 PM Andy Shevchenko > wrote: > > > The of_gpio.h is going to be removed. In preparation of that convert > > the driver to the agnostic API. > > > > Signed-off-by: Andy S

Re: [PATCH v4 2/8] kunit: drm/tests: move generic helpers

2023-03-22 Thread Andy Shevchenko
n(ish) - maybe already Today and in any > case during this week. I'll be CC:ing you and Brendan with (relevant > patches of) v5 as well. Thank you, folks, for doing this. Let's make Linux kernel greater (than it is already is). -- With Best Regards, Andy Shevchenko

<    1   2   3   4   5   6   7   8   9   10   >