From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu) Date: Sun, 30 Sep 2018 18:57:56 -0400 Subject: Checkpatch.pl warning In-Reply-To: <1538312653.86477263@f27.my.com> References: <1538312653.86477263@f27.my.com> Message-ID: <30947.1538348276@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sun, 30 Sep 2018 16:04:13 +0300, Shubham Singh said: > Regarding the warning of checkpatch.pl, > " 'str' object has no attribute 'decode' " > This warning is related to spdxcheck.py which is because of version of python > In python3 str has no attribute decode(), while it works fine in python2, without any warning. > I checked the patch related to this > https://lore.kernel.org/lkml/20180717190635.29467-1-jcline at redhat.com/T/#u > We can resolve the warning by just putting an if statement above line.decode() to resolve the warning. I'm assuming you're using a 4.19-rc1 or later kernel, as Cline's patch first appeared in a mainline kernel at that tag, and next-20180820 for the -next tree. Are you saying this commit: commit bed95c43c15eb6b1ccc5b09e5ae08cac726c456d Author: Jeremy Cline Date: Fri Aug 17 15:44:01 2018 -0700 scripts: add Python 3 compatibility to spdxcheck.py is incomplete and needs patches? > Am I right or I missed something? If you are right, there *is* something missing - a patch. :)