Re: [PATCH] ath5k: replace deprecated strncpy with strscpy

2023-10-15 Thread Jiri Slaby
On 13. 10. 23, 22:53, Justin Stitt wrote: strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect led->name to be NUL-terminated based on the presence of a manual NUL-byte assignment. This

Re: [PATCH v5 4/8] soc/tegra: fuse: Add tegra_acpi_init_apbmisc()

2023-10-15 Thread Christophe JAILLET
Le 16/10/2023 à 07:34, Kartik a écrit : In preparation to ACPI support in Tegra fuse driver add function tegra_acpi_init_apbmisc() to initialize tegra-apbmisc driver. Also, document the reason of calling tegra_init_apbmisc() at early init. Note that function tegra_acpi_init_apbmisc() is not plac

[PATCH v5 7/8] soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234

2023-10-15 Thread Kartik
Add ACPI support for Tegra194 & Tegra243 SoC's. This requires following modifications to the probe when ACPI boot is used: - Initialize soc data. - Add nvmem lookups. - Register soc device. - use devm_clk_get_optional() instead of devm_clk_get() to get fuse->clk, as fuse clocks are not requi

[PATCH v5 8/8] soc/tegra: fuse: Add support for Tegra241

2023-10-15 Thread Kartik
Add support for Tegra241 which use ACPI boot. Signed-off-by: Kartik --- v1 -> v2: * Removed few entries from tegra241_fuse_soc which were initilized as NULL or 0. --- drivers/soc/tegra/Kconfig | 5 + drivers/soc/tegra/fuse/fuse-tegra.c| 5 + drivers/s

[PATCH v5 6/8] soc/tegra: fuse: Add function to print SKU info

2023-10-15 Thread Kartik
Add helper function tegra_fuse_print_sku_info() to print Tegra SKU information. So, it can be shared between tegra_fuse_init() and ACPI probe which is to be introduced later. Signed-off-by: Kartik --- v1 -> v2: * Renamed tegra_fuse_pr_sku_info() as tegra_fuse_print_sku_info(). -

[PATCH v5 5/8] soc/tegra: fuse: Add function to add lookups

2023-10-15 Thread Kartik
Add helper function tegra_fuse_add_lookups() to register Tegra fuse nvmem lookups. So, this can be shared between tegra_fuse_init() and ACPI probe, which is to be introduced later. Use kmemdup_array to duplicate fuse->soc->lookups. Signed-off-by: Kartik --- v3 -> v4: * Use kmemdup_array

[PATCH v5 4/8] soc/tegra: fuse: Add tegra_acpi_init_apbmisc()

2023-10-15 Thread Kartik
In preparation to ACPI support in Tegra fuse driver add function tegra_acpi_init_apbmisc() to initialize tegra-apbmisc driver. Also, document the reason of calling tegra_init_apbmisc() at early init. Note that function tegra_acpi_init_apbmisc() is not placed in the __init section, because it will

[PATCH v5 2/8] soc/tegra: fuse: Use dev_err_probe for probe failures

2023-10-15 Thread Kartik
Currently, in tegra_fuse_probe() if clock/reset get fails, then the driver prints an error if the error is not caused by -EPROBE_DEFER. This can be improved by using dev_err_probe() instead. So, return dev_err_probe() if clock/reset get fails. Signed-off-by: Kartik --- drivers/soc/tegra/fuse/fu

[PATCH v5 3/8] soc/tegra: fuse: Refactor resource mapping

2023-10-15 Thread Kartik
To prepare for adding ACPI support to the tegra-apbmisc driver, relocate the code responsible for mapping memory resources from the function ‘tegra_init_apbmisc’ to the function ‘tegra_init_apbmisc_resources.’ This adjustment will allow the code to be shared between ‘tegra_init_apbmisc’ and the upc

[PATCH v5 1/8] mm/util: Introduce kmemdup_array()

2023-10-15 Thread Kartik
Introduce kmemdup_array() API to duplicate `n` number of elements from a given array. This internally uses kmemdup to allocate and duplicate the `src` array. Signed-off-by: Kartik --- v4 -> v5: * Simplify the implementation by just returning kmemdup(size_mul). --- include/linux/string.h

[PATCH v5 0/8] soc/tegra: fuse: Add ACPI support

2023-10-15 Thread Kartik
This series of patches add ACPI support for Tegra194 and Tegra234 in Tegra fuse and apbmisc drivers. It also adds support for Tegra241 which uses ACPI boot. Kartik (8): mm/util: Introduce kmemdup_array() soc/tegra: fuse: Use dev_err_probe for probe failures soc/tegra: fuse: Refactor resource

[PATCH] PCI: pciehp: Prevent child devices from doing RPM on PCIe Link Down

2023-10-15 Thread Kai-Heng Feng
When inserting an SD7.0 card to Realtek card reader, it can trigger PCI slot Link down and causes the following error: [ 63.898861] pcieport :00:1c.0: pciehp: Slot(8): Link Down [ 63.912118] BUG: unable to handle page fault for address: b24d403e5010 [ 63.912122] #PF: supervisor read a

RE: [PATCH] net: txgbe: replace deprecated strncpy with strscpy

2023-10-15 Thread Jiawen Wu
On Sunday, October 15, 2023 12:31 AM, Andrew Lunn wrote: > On Thu, Oct 12, 2023 at 09:20:04PM +, Justin Stitt wrote: > > strncpy() is deprecated for use on NUL-terminated destination strings > > [1] and as such we should prefer more robust and less ambiguous string > > interfaces. > > > > Based

RE: [PATCH 2/2][next] clk: visconti: Add bounds-checking coverage for struct visconti_pll_provider

2023-10-15 Thread nobuhiro1.iwamatsu
Hi Gustavo A. R. Silva, Thanks for your patch! > -Original Message- > From: Gustavo A. R. Silva > Sent: Thursday, October 12, 2023 11:19 AM > To: Michael Turquette ; Stephen Boyd > ; iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○O > ST) > Cc: Kees Cook ; linux-...@vger.kernel.org; > linux-arm-ker..

RE: [PATCH 1/2][next] clk: visconti: Fix undefined behavior bug in struct visconti_pll_provider

2023-10-15 Thread nobuhiro1.iwamatsu
Hi Gustavo A. R. Silva, Thanks for your patch! > -Original Message- > From: Gustavo A. R. Silva > Sent: Thursday, October 12, 2023 11:18 AM > To: Michael Turquette ; Stephen Boyd > ; iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○O > ST) > Cc: Kees Cook ; linux-...@vger.kernel.org; > linux-arm-ker..

Re: [PATCH] net: phy: smsc: replace deprecated strncpy with ethtool_sprintf

2023-10-15 Thread Simon Horman
On Thu, Oct 12, 2023 at 10:27:52PM +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > ethtool_sprintf() is designed specifically for get_strings() usage. > Let

Re: [PATCH v2 2/2] net: openvswitch: Annotate struct mask_array with __counted_by

2023-10-15 Thread Christophe JAILLET
Le 15/10/2023 à 06:53, Julia Lawall a écrit : On Sat, 14 Oct 2023, Kees Cook wrote: On Sat, Oct 14, 2023 at 08:34:53AM +0200, Christophe JAILLET wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can