Samsung mach/soc changes for v5.16

A minor fix for theoretical issue when handling IRQ setup code errors in
 S3C24xx and a cleanup for S3C64xx.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmF3zVwQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD17VpD/sGwJ4Xjvl5GDKwn7kD6PlIR1Ni2g6L42cP
 zs6ssZgqw8pHHsWyIEb3evRIs2ZB9aeoPl+wytJ3YMHYQ5OG+xjOZlYjBKYR5E9q
 cP6iUsNQxr+moTSPih76PsBb6y4OPQH4NrHMXSsBYbV4cYieeSPQGdorsz4gVh4Q
 gl3VXStrQ+kSySF5Bx+M6NArTrSAbKV9L3AgR0bDzJTFQmsRp315dGulzdQY9Cv7
 HyoBibluWbXPYlRLlxniEwZfxyuz8HuOgiWTyf8H4mEUtYyOyzA4V8rkCN7ETsuo
 v7922uh5cWMwiDAGzgK7Wk716U8yhB165jmkJTQAN2CUYz1QmPyDhFrjwQmWWia8
 SJMfRkIl4ozBXf+MKWBaWRgABWBNFJpRu4qyK/WRyUml1AwCKRrqLF4KdRKcQciG
 DL0h3lqRKdfkIW9vWF3Y38lEBoIhmh7f1efpSQVKBJeUH8jSgXi5akCEIW8UrWTd
 E0WNFwDc7T+EXYTT/bUB9YAsfFa8M56kelLhsb4dCH4EywxMLFg3blwaJLQZFTDv
 viB7AWi83BTHkak7AVsUs45mdWMDSvMb0lfjEa7Ulo/K6dbmzwBiBI0rOuMgJXFN
 //GcAPHA0n3fCQ0rGlLBWKrmmVYcCgn8lFVWJ7vxDpbqN3sLwWi8JgbTJowXe6VL
 t0+wq4Eyaw==
 =yvj/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmF4GCcACgkQmmx57+YA
 GNkTOxAAuELCYTrfvM/xx8GS7cNDJovzXW2aSUJ0JJJW8izGEYtzRuhMCXlRL7m7
 WKsfnZ6WwpCQKldz3In70p6yoK1FyJri6qEeNqmx213v8tKuQV2r4VZ9hRIwQWOV
 mqCOZskgUkQ1fH+LP2OyakAgAuQXyAjCWlI6nBjZwbvkGqo0HuwexUkkEq4YhpoC
 pBJUC0iELp3iTAIpLSN5NoPe+58mqMkFzKvjp9mVmYQeQqy+NYOJH3v3OY9ak27H
 SY4grY97Wgrurk+shJKIRhFBpT8RFoIixhDwaHpBY+95uYoNCaNCbTZ3rf4FDaje
 rTinjEW/N6AsMPghbl3DGGHjzh62Y8YGMcaRs/18QOotfcp5tvLoZtrMRCu83i30
 QxmaNdm5pp67bmtYynNC4FvaoQk/LoAOkQfBDC96WBqgJVgTxDngIAJXSFxyOKyi
 V78xmQHcSJoIYeqodGoFwXBuNdhFXKqnDm4w1c+VJ36PlyLwC6lE8hUE9xqIloBF
 UhbB6jIM6WBqJtF8waaiBkQ/ldoVP8SMYGXsriF5dcwp0xX0XbzElIjLDSWiBMoR
 wpn7ScvoLvb9Rzlif5QHvvYLM6eGG6uQKYwO86oBsOgwbfzJBfCa62zC2uIHWWzF
 df2N3Op65l+ZkBjAuf1dnTZYuPIn9fRlMrq9GVJEo7OqwPQ3G5U=
 =ZeWZ
 -----END PGP SIGNATURE-----

Merge tag 'samsung-soc-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc

Samsung mach/soc changes for v5.16

A minor fix for theoretical issue when handling IRQ setup code errors in
S3C24xx and a cleanup for S3C64xx.

* tag 'samsung-soc-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: s3c: Use strscpy to replace strlcpy
  ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc()

Link: https://lore.kernel.org/r/20211026094709.75692-5-krzysztof.kozlowski@canonical.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2021-10-26 17:00:54 +02:00
commit d3c2a69919
2 changed files with 19 additions and 5 deletions

View File

@ -361,11 +361,25 @@ static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
static asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs) static asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
{ {
do { do {
if (likely(s3c_intc[0])) /*
if (s3c24xx_handle_intc(s3c_intc[0], regs, 0)) * For platform based machines, neither ERR nor NULL can happen here.
continue; * The s3c24xx_handle_irq() will be set as IRQ handler iff this succeeds:
*
* s3c_intc[0] = s3c24xx_init_intc()
*
* If this fails, the next calls to s3c24xx_init_intc() won't be executed.
*
* For DT machine, s3c_init_intc_of() could set the IRQ handler without
* setting s3c_intc[0] only if it was called with num_ctrl=0. There is no
* such code path, so again the s3c_intc[0] will have a valid pointer if
* set_handle_irq() is called.
*
* Therefore in s3c24xx_handle_irq(), the s3c_intc[0] is always something.
*/
if (s3c24xx_handle_intc(s3c_intc[0], regs, 0))
continue;
if (s3c_intc[2]) if (!IS_ERR_OR_NULL(s3c_intc[2]))
if (s3c24xx_handle_intc(s3c_intc[2], regs, 64)) if (s3c24xx_handle_intc(s3c_intc[2], regs, 64))
continue; continue;

View File

@ -262,7 +262,7 @@ static char mini6410_features_str[12] __initdata = "0";
static int __init mini6410_features_setup(char *str) static int __init mini6410_features_setup(char *str)
{ {
if (str) if (str)
strlcpy(mini6410_features_str, str, strscpy(mini6410_features_str, str,
sizeof(mini6410_features_str)); sizeof(mini6410_features_str));
return 1; return 1;
} }