Re: [PATCH net] net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()

2023-10-22 Thread patchwork-bot+netdevbpf
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller :

On Sat, 21 Oct 2023 20:03:53 +0200 you wrote:
> strncat() usage in adf7242_debugfs_init() is wrong.
> The size given to strncat() is the maximum number of bytes that can be
> written, excluding the trailing NULL.
> 
> Here, the size that is passed, DNAME_INLINE_LEN, does not take into account
> the size of "adf7242-" that is already in the array.
> 
> [...]

Here is the summary with links:
  - [net] net: ieee802154: adf7242: Fix some potential buffer overflow in 
adf7242_stats_show()
https://git.kernel.org/netdev/net/c/ca082f019d8f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





Re: [PATCH v2 1/3] soc: qcom: pmic_glink: enable UCSI for SM8350

2023-10-22 Thread Dmitry Baryshkov
On Sat, 21 Oct 2023 at 13:20, Xilin Wu via B4 Relay
 wrote:
>
> From: Xilin Wu 
>
> UCSI is supported on SM8350. Allow it to enable USB role switch and
> altmode notifications on SM8350.

We have had troubles with UCSI on sm8350. I have a workaround for this
(and earlier) platforms. Once it is ready to be posted, I'll include
your patch in the series, if you don't mind.

>
> Signed-off-by: Xilin Wu 
> ---
>  drivers/soc/qcom/pmic_glink.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
> index 914057331afd..1196e79e6fb3 100644
> --- a/drivers/soc/qcom/pmic_glink.c
> +++ b/drivers/soc/qcom/pmic_glink.c
> @@ -341,6 +341,7 @@ static const unsigned long pmic_glink_sm8450_client_mask 
> = BIT(PMIC_GLINK_CLIENT
>
> BIT(PMIC_GLINK_CLIENT_UCSI);
>
>  static const struct of_device_id pmic_glink_of_match[] = {
> +   { .compatible = "qcom,sm8350-pmic-glink", .data = 
> &pmic_glink_sm8450_client_mask },
> { .compatible = "qcom,sm8450-pmic-glink", .data = 
> &pmic_glink_sm8450_client_mask },
> { .compatible = "qcom,sm8550-pmic-glink", .data = 
> &pmic_glink_sm8450_client_mask },
> { .compatible = "qcom,pmic-glink" },
>
> --
> 2.42.0
>


-- 
With best wishes
Dmitry



[PATCH] strstarts: avoid calling strlen() if first char does not match

2023-10-22 Thread James Tirta Halim
---
 include/linux/string.h  | 9 ++---
 tools/bpf/bpftool/gen.c | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/linux/string.h b/include/linux/string.h
index dbfc66400050..1c51039604e7 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -214,7 +214,7 @@ int ptr_to_hashval(const void *ptr, unsigned long 
*hashval_out);
  */
 static inline bool strstarts(const char *str, const char *prefix)
 {
-   return strncmp(str, prefix, strlen(prefix)) == 0;
+   return (*str == *prefix) ? strncmp(str, prefix, strlen(prefix)) == 0 : 
(*prefix == '\0');
 }
 
 size_t memweight(const void *ptr, size_t bytes);
@@ -356,8 +356,11 @@ void memcpy_and_pad(void *dest, size_t dest_len, const 
void *src, size_t count,
  */
 static __always_inline size_t str_has_prefix(const char *str, const char 
*prefix)
 {
-   size_t len = strlen(prefix);
-   return strncmp(str, prefix, len) == 0 ? len : 0;
+   if (*str == *prefix) {
+   size_t len = strlen(prefix);
+   return strncmp(str, prefix, len) == 0 ? len : 0;
+   }
+   return *prefix == '\0';
 }
 
 #endif /* _LINUX_STRING_H_ */
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 2883660d6b67..5f8db7e517bc 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -36,7 +36,7 @@ static void sanitize_identifier(char *name)
 
 static bool str_has_prefix(const char *str, const char *prefix)
 {
-   return strncmp(str, prefix, strlen(prefix)) == 0;
+   return (*str == *prefix) ? strncmp(str, prefix, strlen(prefix)) == 0 : 
(*prefix == '\0');
 }
 
 static bool str_has_suffix(const char *str, const char *suffix)
-- 
2.42.0




Re: [PATCH] strstarts: avoid calling strlen() if first char does not match

2023-10-22 Thread Greg KH
On Sun, Oct 22, 2023 at 06:35:47PM +0700, James Tirta Halim wrote:
> ---
>  include/linux/string.h  | 9 ++---
>  tools/bpf/bpftool/gen.c | 2 +-
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/string.h b/include/linux/string.h
> index dbfc66400050..1c51039604e7 100644
> --- a/include/linux/string.h
> +++ b/include/linux/string.h
> @@ -214,7 +214,7 @@ int ptr_to_hashval(const void *ptr, unsigned long 
> *hashval_out);
>   */
>  static inline bool strstarts(const char *str, const char *prefix)
>  {
> - return strncmp(str, prefix, strlen(prefix)) == 0;
> + return (*str == *prefix) ? strncmp(str, prefix, strlen(prefix)) == 0 : 
> (*prefix == '\0');
>  }
>  
>  size_t memweight(const void *ptr, size_t bytes);
> @@ -356,8 +356,11 @@ void memcpy_and_pad(void *dest, size_t dest_len, const 
> void *src, size_t count,
>   */
>  static __always_inline size_t str_has_prefix(const char *str, const char 
> *prefix)
>  {
> - size_t len = strlen(prefix);
> - return strncmp(str, prefix, len) == 0 ? len : 0;
> + if (*str == *prefix) {
> + size_t len = strlen(prefix);
> + return strncmp(str, prefix, len) == 0 ? len : 0;
> + }
> + return *prefix == '\0';
>  }
>  
>  #endif /* _LINUX_STRING_H_ */
> diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
> index 2883660d6b67..5f8db7e517bc 100644
> --- a/tools/bpf/bpftool/gen.c
> +++ b/tools/bpf/bpftool/gen.c
> @@ -36,7 +36,7 @@ static void sanitize_identifier(char *name)
>  
>  static bool str_has_prefix(const char *str, const char *prefix)
>  {
> - return strncmp(str, prefix, strlen(prefix)) == 0;
> + return (*str == *prefix) ? strncmp(str, prefix, strlen(prefix)) == 0 : 
> (*prefix == '\0');
>  }
>  
>  static bool str_has_suffix(const char *str, const char *suffix)
> -- 
> 2.42.0
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/process/submitting-patches.rst and resend
  it after adding that line.  Note, the line needs to be in the body of
  the email, before the patch, not at the bottom of the patch or in the
  email signature.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what is needed in
  order to properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what a proper
  Subject: line should look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot



Re: [PATCH v5 1/2] From: Luka Panio

2023-10-22 Thread Krzysztof Kozlowski
On 21/10/2023 22:34, Luka Panio wrote:
> dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)

Your subject is not correct.

> 
> Add a compatible for Xiaomi Pad 6.
> 
> Signed-off-by: Luka Panio 
> 
> ---
> Update commit message

Please include full changelog. This is v5 so what happened between v1
and v5?


Best regards,
Krzysztof




Re: [PATCH v5 1/2] From: Luka Panio

2023-10-22 Thread Luka Panio
>> dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)

> Your subject is not correct.

Sorry, but what should be there?

>Please include full changelog. This is v5 so what happened between v1
>and v5?

That is a full changelog, no other changes to dt-bindings were done.
 Thanks,
Luka Panio



[PATCH v6 1/2] dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)

2023-10-22 Thread Luka Panio
Add a compatible for Xiaomi Pad 6.

Signed-off-by: Luka Panio 

---
v2:
Update commit message

v3:
Update commit message

v4:
Update commit message

v5:
Update commit message

v6:
Update commit message
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml 
b/Documentation/devicetree/bindings/arm/qcom.yaml
index adbfaea32343..1bfae1b237d2 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -965,6 +965,7 @@ properties:
   - sony,pdx203-generic
   - sony,pdx206-generic
   - xiaomi,elish
+  - xiaomi,pipa
   - const: qcom,sm8250
 
   - items:
-- 
2.42.0




[PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

2023-10-22 Thread Luka Panio
Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc.

Signed-off-by: Luka Panio 
---
v2:
Update commit message. Drop reserved gpio's as this device in reality do not 
have gpio, and pins are not protected.

v3:
Update commit message.

v4:
Update commit message.

v5:
Update commit message.

v6:
Update commit message.
---
 arch/arm64/boot/dts/qcom/Makefile |   1 +
 .../boot/dts/qcom/sm8250-xiaomi-pipa.dts  | 625 ++
 2 files changed, 626 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile 
b/arch/arm64/boot/dts/qcom/Makefile
index 2cca20563a1d..41ab333d1f81 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -208,6 +208,7 @@ dtb-$(CONFIG_ARCH_QCOM) += 
sm8250-sony-xperia-edo-pdx203.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sm8250-sony-xperia-edo-pdx206.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sm8250-xiaomi-elish-boe.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sm8250-xiaomi-elish-csot.dtb
+dtb-$(CONFIG_ARCH_QCOM)+= sm8250-xiaomi-pipa.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sm8350-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sm8350-microsoft-surface-duo2.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sm8350-mtp.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts 
b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
new file mode 100644
index ..41eae1aaa2a8
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
@@ -0,0 +1,625 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 luka177 
+ */
+
+/dts-v1/;
+
+#include 
+#include 
+#include 
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+#include "pm8009.dtsi"
+
+/*
+ * Delete following upstream (sm8250.dtsi) reserved
+ * memory mappings which are different on this device.
+ */
+/delete-node/ &adsp_mem;
+/delete-node/ &cdsp_secure_heap;
+/delete-node/ &slpi_mem;
+/delete-node/ &spss_mem;
+/delete-node/ &xbl_aop_mem;
+
+/ {
+
+   model = "Xiaomi Pad 6";
+   compatible = "xiaomi,pipa", "qcom,sm8250";
+
+   classis-type = "tablet";
+
+   /* required for bootloader to select correct board */
+   qcom,msm-id = ; /* SM8250 v2.1 */
+   qcom,board-id = <0x34 0>;
+
+   chosen {
+   #address-cells = <2>;
+   #size-cells = <2>;
+   ranges;
+
+   framebuffer: framebuffer@9c00 {
+   compatible = "simple-framebuffer";
+   reg = <0x0 0x9c00 0x0 0x230>;
+   width = <1800>;
+   height = <2880>;
+   stride = <(1800 * 4)>;
+   format = "a8r8g8b8";
+   };
+   };
+
+   battery_l: battery-l {
+   compatible = "simple-battery";
+   voltage-min-design-microvolt = <387>;
+   energy-full-design-microwatt-hours = <1670>;
+   charge-full-design-microamp-hours = <442>;
+   };
+
+   battery_r: battery-r {
+   compatible = "simple-battery";
+   voltage-min-design-microvolt = <387>;
+   energy-full-design-microwatt-hours = <1670>;
+   charge-full-design-microamp-hours = <442>;
+   };
+
+   bl_vddpos_5p5: bl-vddpos-regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "bl_vddpos_5p5";
+   regulator-min-microvolt = <550>;
+   regulator-max-microvolt = <550>;
+   regulator-enable-ramp-delay = <233>;
+   gpio = <&tlmm 130 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   regulator-boot-on;
+   };
+
+   bl_vddneg_5p5: bl-vddneg-regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "bl_vddneg_5p5";
+   regulator-min-microvolt = <550>;
+   regulator-max-microvolt = <550>;
+   regulator-enable-ramp-delay = <233>;
+   gpio = <&tlmm 131 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   regulator-boot-on;
+   };
+
+   gpio_keys: gpio-keys {
+   compatible = "gpio-keys";
+
+   pinctrl-names = "default";
+   pinctrl-0 = <&vol_up_n>;
+
+   key-vol-up {
+   label = "Volume Up";
+   gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   debounce-interval = <15>;
+   linux,can-disable;
+   wakeup-source;
+   };
+   };
+
+   vph_pwr: vph-pwr-regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "vph_pwr";
+   regulator-min-microvolt = <370>;
+   regulator-max-microvolt = <370>;
+   };
+
+   

Re: [PATCH v6 1/2] dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)

2023-10-22 Thread Conor Dooley
On Sun, Oct 22, 2023 at 07:38:10PM +0200, Luka Panio wrote:
> Add a compatible for Xiaomi Pad 6.
> 
> Signed-off-by: Luka Panio 

Acked-by: Conor Dooley 

Thanks
Conor.

> 
> ---
> v2:
> Update commit message
> 
> v3:
> Update commit message
> 
> v4:
> Update commit message
> 
> v5:
> Update commit message
> 
> v6:
> Update commit message
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml 
> b/Documentation/devicetree/bindings/arm/qcom.yaml
> index adbfaea32343..1bfae1b237d2 100644
> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> @@ -965,6 +965,7 @@ properties:
>- sony,pdx203-generic
>- sony,pdx206-generic
>- xiaomi,elish
> +  - xiaomi,pipa
>- const: qcom,sm8250
>  
>- items:
> -- 
> 2.42.0
> 


signature.asc
Description: PGP signature


Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

2023-10-22 Thread Krzysztof Kozlowski
On 22/10/2023 19:38, Luka Panio wrote:
> Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc.
> 
> Signed-off-by: Luka Panio 
> ---
> v2:
> Update commit message. Drop reserved gpio's as this device in reality do not 
> have gpio, and pins are not protected.
> 

> v3:
> Update commit message.
> 
> v4:
> Update commit message.
> 
> v5:
> Update commit message.
> 
> v6:
> Update commit message.
> ---
>  arch/arm64/boot/dts/qcom/Makefile |   1 +
>  .../boot/dts/qcom/sm8250-xiaomi-pipa.dts  | 625 ++
>  2 files changed, 626 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile 
> b/arch/arm64/boot/dts/qcom/Makefile
> index 2cca20563a1d..41ab333d1f81 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -208,6 +208,7 @@ dtb-$(CONFIG_ARCH_QCOM)   += 
> sm8250-sony-xperia-edo-pdx203.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sm8250-sony-xperia-edo-pdx206.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sm8250-xiaomi-elish-boe.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sm8250-xiaomi-elish-csot.dtb
> +dtb-$(CONFIG_ARCH_QCOM)  += sm8250-xiaomi-pipa.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sm8350-hdk.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sm8350-microsoft-surface-duo2.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sm8350-mtp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts 
> b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
> new file mode 100644
> index ..41eae1aaa2a8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
> @@ -0,0 +1,625 @@
> +// SPDX-License-Identifier: BSD-3-Clause

If there are no other copyrights here, why did you use BSD-3 license?

> +/*
> + * Copyright (c) 2023 luka177 
> + */
> +
> +/dts-v1/;
> +
> +#include 
> +#include 
> +#include 
> +#include "sm8250.dtsi"
> +#include "pm8150.dtsi"
> +#include "pm8150b.dtsi"
> +#include "pm8150l.dtsi"
> +#include "pm8009.dtsi"
> +
> +/*
> + * Delete following upstream (sm8250.dtsi) reserved
> + * memory mappings which are different on this device.
> + */
> +/delete-node/ &adsp_mem;
> +/delete-node/ &cdsp_secure_heap;
> +/delete-node/ &slpi_mem;
> +/delete-node/ &spss_mem;
> +/delete-node/ &xbl_aop_mem;
> +
> +/ {
> +
> + model = "Xiaomi Pad 6";
> + compatible = "xiaomi,pipa", "qcom,sm8250";
> +
> + classis-type = "tablet";

chassis-type

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).


> +
> + /* required for bootloader to select correct board */
> + qcom,msm-id = ; /* SM8250 v2.1 */
> + qcom,board-id = <0x34 0>;

0x34 or 34?

> +
> + chosen {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;



> +
> +&i2c13 {
> + clock-frequency = <40>;
> + status = "okay";
> +
> + fuel-gauge@55 {
> + compatible = "ti,bq27z561";
> + reg = <0x55>;
> + monitored-battery = <&battery_l>;
> + };
> +};
> +
> +
> +

Just one blank line

> +&pcie0 {
> + status = "okay";
> +};
> +
> +&pcie0_phy {
> + vdda-phy-supply = <&vreg_l5a_0p88>;
> + vdda-pll-supply = <&vreg_l9a_1p2>;
> + status = "okay";
> +};



Best regards,
Krzysztof




Re: [PATCH v5 1/2] From: Luka Panio

2023-10-22 Thread Krzysztof Kozlowski
On 22/10/2023 19:26, Luka Panio wrote:
>>> dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)
> 
>> Your subject is not correct.
> 
> Sorry, but what should be there?

Your subject is:
"From: Luka Panio"
Subject contains git commit subject. See git log --- PATH for ideas.

> 
>> Please include full changelog. This is v5 so what happened between v1
>> and v5?
> 
> That is a full changelog, no other changes to dt-bindings were done.



Best regards,
Krzysztof




Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

2023-10-22 Thread Luka Panio
On Sun, Oct 22, 2023 at 8:46 PM Krzysztof Kozlowski
 wrote:

> If there are no other copyrights here, why did you use BSD-3 license?
I am by no means a licensing expert, but as sm8250.dts did use BSD-3
and other device tree's (for example sm8250-xiaomi-elish-boe.dts) did
use it, I thought I should do the same. Should I drop it?

>
> chassis-type
>
> It does not look like you tested the DTS against bindings. Please run
> `make dtbs_check W=1` (see
> Documentation/devicetree/bindings/writing-schema.rst or
> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
> for instructions).
>
Thanks, will do.

> 0x34 or 34?
Yes 0x24, should i tend to use decimal?
Thanks,
Luka

P.S. Sorry if you got duplicated email



Re: [PATCH v6 7/9] arm64: Kconfig.platforms: Add config for Marvell PXA1908 platform

2023-10-22 Thread kernel test robot
Hi Duje,

kernel test robot noticed the following build errors:

[auto build test ERROR on 94f6f0550c625fab1f373bb86a6669b45e9748b3]

url:
https://github.com/intel-lab-lkp/linux/commits/Duje-Mihanovi/clk-mmp-Switch-to-use-struct-u32_fract-instead-of-custom-one/20231011-012919
base:   94f6f0550c625fab1f373bb86a6669b45e9748b3
patch link:
https://lore.kernel.org/r/20231010-pxa1908-lkml-v6-7-b2fe09240cf8%40skole.hr
patch subject: [PATCH v6 7/9] arm64: Kconfig.platforms: Add config for Marvell 
PXA1908 platform
config: arm64-allyesconfig 
(https://download.01.org/0day-ci/archive/20231023/202310230518.zs9qpg3j-...@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20231023/202310230518.zs9qpg3j-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202310230518.zs9qpg3j-...@intel.com/

All errors (new ones prefixed by >>):

   /tmp/cc7DnLj6.s: Assembler messages:
>> /tmp/cc7DnLj6.s:2851: Error: unknown mnemonic `ldmia' -- `ldmia 
>> x23,{r0,r1,r2,r3}'
>> /tmp/cc7DnLj6.s:2852: Error: unknown mnemonic `stmia' -- `stmia 
>> x19!,{r0,r1,r2,r3}'
>> /tmp/cc7DnLj6.s:3125: Error: unknown mnemonic `ldmia' -- `ldmia 
>> x19!,{r0,r1,r2,r3}'
>> /tmp/cc7DnLj6.s:3126: Error: unknown mnemonic `stmia' -- `stmia 
>> x23,{r0,r1,r2,r3}'

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SND_ARM
   Depends on [n]: SOUND [=y] && SND [=y] && ARM
   Selected by [y]:
   - SND_MMP_SOC_SSPA [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && 
ARCH_MMP [=y]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



Re: [PATCH v2 1/3] soc: qcom: pmic_glink: enable UCSI for SM8350

2023-10-22 Thread Sophon Wu
Dmitry Baryshkov  于2023年10月22日周日 18:51写道:
>
> On Sat, 21 Oct 2023 at 13:20, Xilin Wu via B4 Relay
>  wrote:
> >
> > From: Xilin Wu 
> >
> > UCSI is supported on SM8350. Allow it to enable USB role switch and
> > altmode notifications on SM8350.
>
> We have had troubles with UCSI on sm8350. I have a workaround for this
> (and earlier) platforms. Once it is ready to be posted, I'll include
> your patch in the series, if you don't mind.

I don't mind of course. Do I possibly need to resend the series without the
pmic_glink patch?

>
> >
> > Signed-off-by: Xilin Wu 
> > ---
> >  drivers/soc/qcom/pmic_glink.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
> > index 914057331afd..1196e79e6fb3 100644
> > --- a/drivers/soc/qcom/pmic_glink.c
> > +++ b/drivers/soc/qcom/pmic_glink.c
> > @@ -341,6 +341,7 @@ static const unsigned long 
> > pmic_glink_sm8450_client_mask = BIT(PMIC_GLINK_CLIENT
> >
> > BIT(PMIC_GLINK_CLIENT_UCSI);
> >
> >  static const struct of_device_id pmic_glink_of_match[] = {
> > +   { .compatible = "qcom,sm8350-pmic-glink", .data = 
> > &pmic_glink_sm8450_client_mask },
> > { .compatible = "qcom,sm8450-pmic-glink", .data = 
> > &pmic_glink_sm8450_client_mask },
> > { .compatible = "qcom,sm8550-pmic-glink", .data = 
> > &pmic_glink_sm8450_client_mask },
> > { .compatible = "qcom,pmic-glink" },
> >
> > --
> > 2.42.0
> >
>
>
> --
> With best wishes
> Dmitry



RE: [PATCH net] net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()

2023-10-22 Thread Hennerich, Michael



> -Original Message-
> From: Christophe JAILLET 
> Sent: Samstag, 21. Oktober 2023 20:04
> To: keesc...@chromium.org; Hennerich, Michael
> ; Alexander Aring ;
> Stefan Schmidt ; Miquel Raynal
> ; David S. Miller ; Eric
> Dumazet ; Jakub Kicinski ; Paolo
> Abeni ; Marcel Holtmann 
> Cc: linux-hardening@vger.kernel.org; linux-ker...@vger.kernel.org; kernel-
> janit...@vger.kernel.org; Christophe JAILLET ;
> Stefan Schmidt ; linux-w...@vger.kernel.org;
> net...@vger.kernel.org
> Subject: [PATCH net] net: ieee802154: adf7242: Fix some potential buffer
> overflow in adf7242_stats_show()
> 
> 
> strncat() usage in adf7242_debugfs_init() is wrong.
> The size given to strncat() is the maximum number of bytes that can be 
> written,
> excluding the trailing NULL.
> 
> Here, the size that is passed, DNAME_INLINE_LEN, does not take into account
> the size of "adf7242-" that is already in the array.
> 
> In order to fix it, use snprintf() instead.
> 
> Fixes: 7302b9d90117 ("ieee802154/adf7242: Driver for ADF7242 MAC
> IEEE802154")
> Signed-off-by: Christophe JAILLET 
> ---

Acked-by: Michael Hennerich 

>  drivers/net/ieee802154/adf7242.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ieee802154/adf7242.c
> b/drivers/net/ieee802154/adf7242.c
> index a03490ba2e5b..cc7ddc40020f 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -1162,9 +1162,10 @@ static int adf7242_stats_show(struct seq_file *file,
> void *offset)
> 
>  static void adf7242_debugfs_init(struct adf7242_local *lp)  {
> - char debugfs_dir_name[DNAME_INLINE_LEN + 1] = "adf7242-";
> + char debugfs_dir_name[DNAME_INLINE_LEN + 1];
> 
> - strncat(debugfs_dir_name, dev_name(&lp->spi->dev),
> DNAME_INLINE_LEN);
> + snprintf(debugfs_dir_name, sizeof(debugfs_dir_name),
> +  "adf7242-%s", dev_name(&lp->spi->dev));
> 
>   lp->debugfs_root = debugfs_create_dir(debugfs_dir_name, NULL);
> 
> --
> 2.34.1



Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

2023-10-22 Thread Krzysztof Kozlowski
On 22/10/2023 21:56, Luka Panio wrote:
> On Sun, Oct 22, 2023 at 8:46 PM Krzysztof Kozlowski
>  wrote:
> 
>> If there are no other copyrights here, why did you use BSD-3 license?
> I am by no means a licensing expert, but as sm8250.dts did use BSD-3
> and other device tree's (for example sm8250-xiaomi-elish-boe.dts) did
> use it, I thought I should do the same. Should I drop it?

Did you base your work on these files? This would explain the license,
but then please include original copyrights.

> 
>>
>> chassis-type
>>
>> It does not look like you tested the DTS against bindings. Please run
>> `make dtbs_check W=1` (see
>> Documentation/devicetree/bindings/writing-schema.rst or
>> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
>> for instructions).
>>
> Thanks, will do.
> 
>> 0x34 or 34?
> Yes 0x24, should i tend to use decimal?

Please do not trim the content that much. How can I know to what you
refer here? What was in original code? 0x24?



Best regards,
Krzysztof




Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

2023-10-22 Thread Luka Panio
>Did you base your work on these files? This would explain the license,
> but then please include original copyrights.
No, but the sm8250.dtsi that I do include has that license. Same as
all other sm8250 device's dts's so i thought mine should not be
different?

>Please do not trim the content that much. How can I know to what you
>refer here? What was in original code? 0x24?
Sorry, indeed I did mean 0x34, but I am not really sure what I
can/should do about that, in the and only reason for it is to make
bootloader happy, should i mention that as a comment?

Thanks,
Luka Panio