Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf
@ 2026-04-24  9:39 Petr Vorel
  2026-04-24  9:39 ` [LTP] [PATCH 1/4] Update spellings to next-20260423 Petr Vorel
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Petr Vorel @ 2026-04-24  9:39 UTC (permalink / raw)
  To: ltp

Enhancement to reduce duplicity + add more checks.

Petr Vorel (4):
  Update spellings to next-20260423
  checkpatch: Update to use new features
  Add .checkpatch.conf for checkpatch.pl
  checkpatch: Enable more checks, disable ENOSYS

 .b4-config             |   5 +-
 .checkpatch.conf       |  19 +++
 .gitignore             |   3 +
 include/mk/env_post.mk |   2 +-
 scripts/checkpatch.pl  | 133 ++++++++++++++---
 scripts/spelling.txt   | 331 +++++++++++++++++++++--------------------
 6 files changed, 303 insertions(+), 190 deletions(-)
 create mode 100644 .checkpatch.conf

-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [LTP] [PATCH 1/4] Update spellings to next-20260423
  2026-04-24  9:39 [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Petr Vorel
@ 2026-04-24  9:39 ` Petr Vorel
  2026-04-24 10:25   ` [LTP] " linuxtestproject.agent
  2026-04-24  9:39 ` [LTP] [PATCH 2/4] checkpatch: Update to use new features Petr Vorel
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2026-04-24  9:39 UTC (permalink / raw)
  To: ltp

Update to next-20260423, last change in 3b4a84e89e2b.

Changes are:
* 3b4a84e89e2b ("scripts/spelling.txt: add "exaclty" typo")
* e604f20034b9 ("scripts/spelling.txt: sort alphabetically")
* c5f591a73e8c ("scripts/spelling.txt: add "binded||bound"")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 scripts/spelling.txt | 331 ++++++++++++++++++++++---------------------
 1 file changed, 166 insertions(+), 165 deletions(-)

diff --git a/scripts/spelling.txt b/scripts/spelling.txt
index f291668836..2f2e81dbda 100644
--- a/scripts/spelling.txt
+++ b/scripts/spelling.txt
@@ -57,8 +57,8 @@ acknowledgement||acknowledgment
 ackowledge||acknowledge
 ackowledged||acknowledged
 acording||according
-activete||activate
 actived||activated
+activete||activate
 actualy||actually
 actvie||active
 acumulating||accumulating
@@ -66,12 +66,12 @@ acumulative||accumulative
 acumulator||accumulator
 acutally||actually
 adapater||adapter
+adddress||address
 adderted||asserted
 addional||additional
 additionaly||additionally
 additonal||additional
 addres||address
-adddress||address
 addreses||addresses
 addresss||address
 addrress||address
@@ -95,9 +95,9 @@ alegorical||allegorical
 algined||aligned
 algorith||algorithm
 algorithmical||algorithmically
+algorithmn||algorithm
 algoritm||algorithm
 algoritms||algorithms
-algorithmn||algorithm
 algorrithm||algorithm
 algorritm||algorithm
 aligment||alignment
@@ -128,20 +128,20 @@ amount of times||number of times
 amout||amount
 amplifer||amplifier
 amplifyer||amplifier
-an union||a union
-an user||a user
-an userspace||a userspace
-an one||a one
 analysator||analyzer
 ang||and
 anniversery||anniversary
 annoucement||announcement
 anomolies||anomalies
 anomoly||anomaly
+an one||a one
 anonynous||anonymous
+an union||a union
+an user||a user
+an userspace||a userspace
 anway||anyway
-aplication||application
 apeared||appeared
+aplication||application
 appearence||appearance
 applicaion||application
 appliction||application
@@ -155,8 +155,8 @@ approriately||appropriately
 apropriate||appropriate
 aquainted||acquainted
 aquired||acquired
-aquisition||acquisition
 aquires||acquires
+aquisition||acquisition
 arbitary||arbitrary
 architechture||architecture
 archtecture||architecture
@@ -189,30 +189,30 @@ assum||assume
 assumtpion||assumption
 asume||assume
 asuming||assuming
-asycronous||asynchronous
 asychronous||asynchronous
+asycronous||asynchronous
+asymetric||asymmetric
+asymmeric||asymmetric
 asynchnous||asynchronous
 asynchrnous||asynchronous
-asynchronus||asynchronous
 asynchromous||asynchronous
-asymetric||asymmetric
-asymmeric||asymmetric
+asynchronus||asynchronous
+atempt||attempt
 atleast||at least
 atomatically||automatically
 atomicly||atomically
-atempt||attempt
 atrributes||attributes
 attachement||attachment
 attatch||attach
 attched||attached
 attemp||attempt
-attemps||attempts
 attemping||attempting
+attemps||attempts
 attepmpt||attempt
 attnetion||attention
 attruibutes||attributes
-authentification||authentication
 authenicated||authenticated
+authentification||authentication
 automaticaly||automatically
 automaticly||automatically
 automatize||automate
@@ -257,6 +257,7 @@ begining||beginning
 beter||better
 betweeen||between
 bianries||binaries
+binded||bound
 bitmast||bitmask
 bitwiedh||bitwidth
 boardcast||broadcast
@@ -287,19 +288,19 @@ calucate||calculate
 calulate||calculate
 cancelation||cancellation
 cancle||cancel
-cant||can't
-cant'||can't
-canot||cannot
-cann't||can't
 cannnot||cannot
+cann't||can't
+canot||cannot
+cant'||can't
+cant||can't
 capabiity||capability
 capabilites||capabilities
 capabilties||capabilities
 capabilty||capability
 capabitilies||capabilities
 capablity||capability
-capatibilities||capabilities
 capapbilities||capabilities
+capatibilities||capabilities
 captuer||capture
 caputure||capture
 carefuly||carefully
@@ -307,9 +308,9 @@ cariage||carriage
 casued||caused
 catagory||category
 cehck||check
+chache||cache
 challange||challenge
 challanges||challenges
-chache||cache
 chanell||channel
 changable||changeable
 chanined||chained
@@ -347,6 +348,7 @@ colescing||coalescing
 collapsable||collapsible
 colorfull||colorful
 comand||command
+comaptible||compatible
 comit||commit
 commerical||commercial
 comming||coming
@@ -357,10 +359,6 @@ committ||commit
 commmand||command
 commnunication||communication
 commoditiy||commodity
-comsume||consume
-comsumer||consumer
-comsuming||consuming
-comaptible||compatible
 compability||compatibility
 compaibility||compatibility
 comparsion||comparison
@@ -376,22 +374,25 @@ compleatly||completely
 completition||completion
 completly||completely
 complient||compliant
-componnents||components
 compoment||component
+componnents||components
 comppatible||compatible
 compres||compress
 compresion||compression
 compresser||compressor
 comression||compression
+comsume||consume
 comsumed||consumed
+comsumer||consumer
+comsuming||consuming
 comunicate||communicate
 comunication||communication
 conbination||combination
 concurent||concurrent
 conditionaly||conditionally
 conditon||condition
-condtion||condition
 condtional||conditional
+condtion||condition
 conected||connected
 conector||connector
 configed||configured
@@ -428,13 +429,13 @@ continous||continuous
 continously||continuously
 continueing||continuing
 contiuous||continuous
-contraints||constraints
-contruct||construct
 contol||control
 contoller||controller
+contraints||constraints
 controled||controlled
 controler||controller
 controll||control
+contruct||construct
 contruction||construction
 contry||country
 conuntry||country
@@ -465,10 +466,9 @@ debouce||debounce
 decendant||descendant
 decendants||descendants
 decompres||decompress
-decsribed||described
 decrese||decrease
 decription||description
-detault||default
+decsribed||described
 dectected||detected
 defailt||default
 deferal||deferral
@@ -482,9 +482,9 @@ defintion||definition
 defintions||definitions
 defualt||default
 defult||default
-deintializing||deinitializing
-deintialize||deinitialize
 deintialized||deinitialized
+deintialize||deinitialize
+deintializing||deinitializing
 deivce||device
 delared||declared
 delare||declare
@@ -494,8 +494,8 @@ delemiter||delimiter
 deley||delay
 delibrately||deliberately
 delievered||delivered
-demodualtor||demodulator
 demension||dimension
+demodualtor||demodulator
 dependancies||dependencies
 dependancy||dependency
 dependant||dependent
@@ -505,15 +505,15 @@ depreacte||deprecate
 desactivate||deactivate
 desciptor||descriptor
 desciptors||descriptors
-descritpor||descriptor
 descripto||descriptor
 descripton||description
 descrition||description
+descritpor||descriptor
 descritptor||descriptor
 desctiptor||descriptor
+desination||destination
 desriptor||descriptor
 desriptors||descriptors
-desination||destination
 destionation||destination
 destoried||destroyed
 destory||destroy
@@ -521,6 +521,7 @@ destoryed||destroyed
 destorys||destroys
 destroied||destroyed
 detabase||database
+detault||default
 deteced||detected
 detecion||detection
 detectt||detect
@@ -535,55 +536,54 @@ deveolpment||development
 devided||divided
 deviece||device
 devision||division
-diable||disable
 diabled||disabled
+diable||disable
 dicline||decline
+diconnected||disconnected
 dictionnary||dictionary
 didnt||didn't
 diferent||different
-differrence||difference
-diffrent||different
 differenciate||differentiate
+differrence||difference
 diffreential||differential
+diffrent||different
 diffrentiate||differentiate
 difinition||definition
 digial||digital
 dimention||dimension
 dimesions||dimensions
-diconnected||disconnected
-disabed||disabled
-disasembler||disassembler
-disble||disable
-disgest||digest
-disired||desired
-dispalying||displaying
-dissable||disable
-dissapeared||disappeared
 diplay||display
-directon||direction
 direcly||directly
+directon||direction
 direectly||directly
 diregard||disregard
-disassocation||disassociation
-disassocative||disassociative
+disabed||disabled
 disapear||disappear
 disapeared||disappeared
 disappared||disappeared
-disbale||disable
+disasembler||disassembler
+disassocation||disassociation
+disassocative||disassociative
 disbaled||disabled
-disble||disable
+disbale||disable
 disbled||disabled
+disble||disable
+disble||disable
 disconnet||disconnect
 discontinous||discontinuous
+disgest||digest
 disharge||discharge
+disired||desired
 disnabled||disabled
+dispalying||displaying
 dispertion||dispersion
+dissable||disable
+dissapeared||disappeared
 dissapears||disappears
 dissconect||disconnect
 distiction||distinction
 divisable||divisible
 divsiors||divisors
-dsiabled||disabled
 docuentation||documentation
 documantation||documentation
 documentaion||documentation
@@ -598,6 +598,7 @@ downlads||downloads
 droped||dropped
 droput||dropout
 druing||during
+dsiabled||disabled
 dyanmic||dynamic
 dynmaic||dynamic
 eanable||enable
@@ -621,20 +622,20 @@ enble||enable
 enchanced||enhanced
 encorporating||incorporating
 encrupted||encrypted
-encrypiton||encryption
 encryped||encrypted
+encrypiton||encryption
 encryptio||encryption
 endianess||endianness
-enpoint||endpoint
 enhaced||enhanced
 enlightnment||enlightenment
+enocded||encoded
+enought||enough
+enpoint||endpoint
 enqueing||enqueuing
+enterily||entirely
 entires||entries
 entites||entities
 entrys||entries
-enocded||encoded
-enought||enough
-enterily||entirely
 enviroiment||environment
 enviroment||environment
 environement||environment
@@ -654,8 +655,8 @@ evalutes||evaluates
 evalution||evaluation
 evaulated||evaluated
 exaclty||exactly
-excecutable||executable
 excceed||exceed
+excecutable||executable
 exceded||exceeded
 exceds||exceeds
 exceeed||exceed
@@ -669,41 +670,41 @@ exeuction||execution
 existance||existence
 existant||existent
 exixt||exist
-exsits||exists
 exlcude||exclude
 exlcuding||excluding
 exlcusive||exclusive
-exlusive||exclusive
 exlicitly||explicitly
+exlusive||exclusive
 exmaple||example
 expecially||especially
 experies||expires
 explicite||explicit
-explicity||explicitly
 explicitely||explicitly
-explict||explicit
+explicity||explicitly
 explictely||explicitly
+explict||explicit
 explictly||explicitly
 expresion||expression
 exprienced||experienced
 exprimental||experimental
-extened||extended
+exsits||exists
 exteneded||extended
+extened||extended
 extensability||extensibility
-extention||extension
 extenstion||extension
+extention||extension
 extracter||extractor
 faied||failed
 faield||failed
-faild||failed
 failded||failed
+faild||failed
 failer||failure
-faill||fail
 failied||failed
+faill||fail
 faillure||failure
+failng||failing
 failue||failure
 failuer||failure
-failng||failing
 faireness||fairness
 falied||failed
 faliure||failure
@@ -718,15 +719,15 @@ fetcing||fetching
 fileystem||filesystem
 fimrware||firmware
 fimware||firmware
+finanize||finalize
+findn||find
+finilizes||finalizes
+finsih||finish
 firmare||firmware
 firmaware||firmware
 firtly||firstly
 firware||firmware
 firwmare||firmware
-finanize||finalize
-findn||find
-finilizes||finalizes
-finsih||finish
 fliter||filter
 flusing||flushing
 folloing||following
@@ -743,9 +744,9 @@ forwared||forwarded
 frambuffer||framebuffer
 framming||framing
 framwork||framework
+frequancy||frequency
 frequence||frequency
 frequncy||frequency
-frequancy||frequency
 frome||from
 fronend||frontend
 fucntion||function
@@ -767,9 +768,9 @@ gatable||gateable
 gateing||gating
 gauage||gauge
 gaurenteed||guaranteed
-generiously||generously
 genereate||generate
 genereted||generated
+generiously||generously
 genric||generic
 gerenal||general
 geting||getting
@@ -791,18 +792,17 @@ hanlde||handle
 hanled||handled
 happend||happened
 hardare||hardware
-harware||hardware
 hardward||hardware
+harware||hardware
 havind||having
+hearbeat||heartbeat
 heigth||height
+heirachy||hierarchy
 heirarchically||hierarchically
 heirarchy||hierarchy
-heirachy||hierarchy
 helpfull||helpful
-hearbeat||heartbeat
 heterogenous||heterogeneous
 hexdecimal||hexadecimal
-hybernate||hibernate
 hiearchy||hierarchy
 hierachy||hierarchy
 hierarchie||hierarchy
@@ -810,14 +810,14 @@ homogenous||homogeneous
 horizental||horizontal
 howver||however
 hsould||should
+hybernate||hibernate
 hypervior||hypervisor
 hypter||hyper
 idel||idle
 identidier||identifier
 iligal||illegal
-illigal||illegal
 illgal||illegal
-iomaped||iomapped
+illigal||illegal
 imblance||imbalance
 immeadiately||immediately
 immedaite||immediate
@@ -832,13 +832,14 @@ implemantation||implementation
 implemenation||implementation
 implementaiton||implementation
 implementated||implemented
-implemention||implementation
 implementd||implemented
+implemention||implementation
 implemetation||implementation
 implemntation||implementation
 implentation||implementation
 implmentation||implementation
 implmenting||implementing
+inavlid||invalid
 incative||inactive
 incomming||incoming
 incompaitiblity||incompatibility
@@ -870,9 +871,9 @@ infromation||information
 ingore||ignore
 inheritence||inheritance
 inital||initial
-initalized||initialized
 initalised||initialized
 initalise||initialize
+initalized||initialized
 initalize||initialize
 initation||initiation
 initators||initiators
@@ -880,20 +881,20 @@ initialiazation||initialization
 initializationg||initialization
 initializiation||initialization
 initializtion||initialization
-initialze||initialize
 initialzed||initialized
+initialze||initialize
 initialzing||initializing
 initilization||initialization
+initilized||initialized
 initilize||initialize
 initliaze||initialize
-initilized||initialized
 inofficial||unofficial
 inrerface||interface
 insititute||institute
 instace||instance
 instal||install
-instanciate||instantiate
 instanciated||instantiated
+instanciate||instantiate
 instuments||instruments
 insufficent||insufficient
 intead||instead
@@ -912,16 +913,16 @@ intergrated||integrated
 intermittant||intermittent
 internel||internal
 interoprability||interoperability
-interuupt||interrupt
-interupt||interrupt
-interupts||interrupts
-interurpt||interrupt
 interrface||interface
 interrrupt||interrupt
 interrup||interrupt
 interrups||interrupts
 interruptted||interrupted
 interupted||interrupted
+interupt||interrupt
+interupts||interrupts
+interurpt||interrupt
+interuupt||interrupt
 intiailized||initialized
 intial||initial
 intialisation||initialisation
@@ -935,18 +936,18 @@ intrerrupt||interrupt
 intrrupt||interrupt
 intterrupt||interrupt
 intuative||intuitive
-inavlid||invalid
 invaid||invalid
 invaild||invalid
 invailid||invalid
-invald||invalid
 invalde||invalid
+invald||invalid
 invalide||invalid
 invalidiate||invalidate
 invalud||invalid
 invididual||individual
 invokation||invocation
 invokations||invocations
+iomaped||iomapped
 ireelevant||irrelevant
 irrelevent||irrelevant
 isnt||isn't
@@ -992,11 +993,11 @@ losted||lost
 maangement||management
 machinary||machinery
 maibox||mailbox
+mailformed||malformed
 maintainance||maintenance
 maintainence||maintenance
 maintan||maintain
 makeing||making
-mailformed||malformed
 malplaced||misplaced
 malplace||misplace
 managable||manageable
@@ -1006,21 +1007,22 @@ mangement||management
 manger||manager
 manoeuvering||maneuvering
 manufaucturing||manufacturing
-mappping||mapping
 maping||mapping
+mappping||mapping
 matchs||matches
 mathimatical||mathematical
 mathimatic||mathematic
 mathimatics||mathematics
-maxmium||maximum
 maximium||maximum
 maxium||maximum
+maxmium||maximum
 mechamism||mechanism
 mechanim||mechanism
 meetign||meeting
 memeory||memory
 memmber||member
 memoery||memory
+memomry||memory
 memroy||memory
 ment||meant
 mergable||mergeable
@@ -1037,19 +1039,19 @@ migrateable||migratable
 miliseconds||milliseconds
 millenium||millennium
 milliseonds||milliseconds
-minimim||minimum
-minium||minimum
 minimam||minimum
+minimim||minimum
 minimun||minimum
+minium||minimum
 miniumum||minimum
 minumum||minimum
 misalinged||misaligned
 miscelleneous||miscellaneous
 misformed||malformed
-mispelled||misspelled
-mispelt||misspelt
 mising||missing
 mismactch||mismatch
+mispelled||misspelled
+mispelt||misspelt
 missign||missing
 missmanaged||mismanaged
 missmatch||mismatch
@@ -1062,18 +1064,17 @@ modifer||modifier
 modul||module
 modulues||modules
 momery||memory
-memomry||memory
 monitring||monitoring
 monochorome||monochrome
 monochromo||monochrome
 monocrome||monochrome
 mopdule||module
 mroe||more
-mulitplied||multiplied
 muliple||multiple
-multipler||multiplier
+mulitplied||multiplied
 multidimensionnal||multidimensional
 multipe||multiple
+multipler||multiplier
 multple||multiple
 mumber||number
 muticast||multicast
@@ -1095,6 +1096,7 @@ nerver||never
 nescessary||necessary
 nessessary||necessary
 none existent||non-existent
+notfify||notify
 noticable||noticeable
 notication||notification
 notications||notifications
@@ -1102,7 +1104,6 @@ notifcations||notifications
 notifed||notified
 notifer||notifier
 notity||notify
-notfify||notify
 nubmer||number
 numebr||number
 numer||number
@@ -1120,10 +1121,10 @@ occurence||occurrence
 occure||occurred
 occuring||occurring
 ocurrence||occurrence
-offser||offset
 offet||offset
 offlaod||offload
 offloded||offloaded
+offser||offset
 offseting||offsetting
 oflload||offload
 omited||omitted
@@ -1142,25 +1143,25 @@ optionnal||optional
 optmizations||optimizations
 orientatied||orientated
 orientied||oriented
-orignal||original
 originial||original
+orignal||original
 orphanded||orphaned
 otherise||otherwise
 ouput||output
 oustanding||outstanding
+oveflow||overflow
 overaall||overall
+overflw||overflow
 overhread||overhead
+overide||override
 overlaping||overlapping
-oveflow||overflow
-overflw||overflow
 overlfow||overflow
-overide||override
 overrided||overridden
 overriden||overridden
 overrrun||overrun
 overun||overrun
-overwritting||overwriting
 overwriten||overwritten
+overwritting||overwriting
 pacakge||package
 pachage||package
 packacge||package
@@ -1170,11 +1171,11 @@ packtes||packets
 pakage||package
 paket||packet
 pallette||palette
-paln||plan
 palne||plane
+paln||plan
 paramameters||parameters
-paramaters||parameters
 paramater||parameter
+paramaters||parameters
 paramenters||parameters
 parametes||parameters
 parametised||parametrised
@@ -1242,8 +1243,6 @@ prefered||preferred
 prefferably||preferably
 prefitler||prefilter
 preform||perform
-previleged||privileged
-previlege||privilege
 premption||preemption
 prepaired||prepared
 prepate||prepare
@@ -1251,6 +1250,8 @@ preperation||preparation
 preprare||prepare
 pressre||pressure
 presuambly||presumably
+previleged||privileged
+previlege||privilege
 previosuly||previously
 previsously||previously
 primative||primitive
@@ -1259,17 +1260,17 @@ priorty||priority
 priting||printing
 privilaged||privileged
 privilage||privilege
-priviledge||privilege
 priviledged||privileged
+priviledge||privilege
 priviledges||privileges
 privleges||privileges
-probaly||probably
 probabalistic||probabilistic
+probaly||probably
 procceed||proceed
 proccesors||processors
 procesed||processed
-proces||process
 procesing||processing
+proces||process
 processessing||processing
 processess||processes
 processpr||processor
@@ -1289,6 +1290,7 @@ progresss||progress
 prohibitted||prohibited
 prohibitting||prohibiting
 promiscous||promiscuous
+promixity||proximity
 promps||prompts
 pronnounced||pronounced
 prononciation||pronunciation
@@ -1297,15 +1299,14 @@ pronunce||pronounce
 propery||property
 propigate||propagate
 propigation||propagation
-propogation||propagation
 propogate||propagate
+propogation||propagation
 prosess||process
 protable||portable
 protcol||protocol
 protecion||protection
 protedcted||protected
 protocoll||protocol
-promixity||proximity
 psudo||pseudo
 psuedo||pseudo
 psychadelic||psychedelic
@@ -1334,8 +1335,8 @@ recieves||receives
 recieving||receiving
 recogniced||recognised
 recognizeable||recognizable
-recompte||recompute
 recommanded||recommended
+recompte||recompute
 recyle||recycle
 redect||reject
 redircet||redirect
@@ -1345,8 +1346,8 @@ reename||rename
 refcounf||refcount
 refence||reference
 refered||referred
-referencce||reference
 referenace||reference
+referencce||reference
 refererence||reference
 refering||referring
 refernces||references
@@ -1354,8 +1355,8 @@ refernnce||reference
 refrence||reference
 regiser||register
 registed||registered
-registerd||registered
 registeration||registration
+registerd||registered
 registeresd||registered
 registerred||registered
 registes||registers
@@ -1372,8 +1373,8 @@ reloade||reload
 remoote||remote
 remore||remote
 removeable||removable
-repective||respective
 repectively||respectively
+repective||respective
 replacable||replaceable
 replacments||replacements
 replys||replies
@@ -1390,8 +1391,8 @@ requieres||requires
 requirment||requirement
 requred||required
 requried||required
-requst||request
 requsted||requested
+requst||request
 reregisteration||reregistration
 reseting||resetting
 reseved||reserved
@@ -1413,11 +1414,11 @@ retransmited||retransmitted
 retreived||retrieved
 retreive||retrieve
 retreiving||retrieving
-retrive||retrieve
 retrived||retrieved
+retrive||retrieve
 retrun||return
-retun||return
 retuned||returned
+retun||return
 reudce||reduce
 reuest||request
 reuqest||request
@@ -1465,9 +1466,9 @@ seperate||separate
 seperatly||separately
 seperator||separator
 sepperate||separate
-seqeunce||sequence
-seqeuncer||sequencer
 seqeuencer||sequencer
+seqeuncer||sequencer
+seqeunce||sequence
 sequece||sequence
 sequemce||sequence
 sequencial||sequential
@@ -1506,8 +1507,8 @@ soley||solely
 soluation||solution
 souce||source
 speach||speech
-specfic||specific
 specfication||specification
+specfic||specific
 specfield||specified
 speciefied||specified
 specifc||specific
@@ -1516,8 +1517,8 @@ specificatin||specification
 specificaton||specification
 specificed||specified
 specifing||specifying
-specifiy||specify
 specifiying||specifying
+specifiy||specify
 speficied||specified
 speicify||specify
 speling||spelling
@@ -1544,23 +1545,23 @@ stoppped||stopped
 straming||streaming
 struc||struct
 structres||structures
-stuct||struct
 strucuture||structure
+stuct||struct
 stucture||structure
 sturcture||structure
 subdirectoires||subdirectories
 suble||subtle
-substract||subtract
 submited||submitted
 submition||submission
+substract||subtract
 succeded||succeeded
-suceed||succeed
-succesfuly||successfully
 succesfully||successfully
 succesful||successful
+succesfuly||successfully
 successed||succeeded
 successfull||successful
 successfuly||successfully
+suceed||succeed
 sucessfully||successfully
 sucessful||successful
 sucess||success
@@ -1569,9 +1570,9 @@ superseeded||superseded
 suplied||supplied
 suported||supported
 suport||support
-supportet||supported
 suppored||supported
 supporing||supporting
+supportet||supported
 supportin||supporting
 suppoted||supported
 suppported||supported
@@ -1582,27 +1583,27 @@ surpressed||suppressed
 surpresses||suppresses
 susbsystem||subsystem
 suspeneded||suspended
-suspsend||suspend
 suspicously||suspiciously
+suspsend||suspend
 swaping||swapping
 switchs||switches
-swith||switch
 swithable||switchable
-swithc||switch
 swithced||switched
 swithcing||switching
+swithc||switch
 swithed||switched
 swithing||switching
+swith||switch
 swtich||switch
+sychronization||synchronization
+sychronously||synchronously
 syfs||sysfs
 symetric||symmetric
 synax||syntax
 synchonized||synchronized
-sychronization||synchronization
-sychronously||synchronously
 synchronuously||synchronously
-syncronize||synchronize
 syncronized||synchronized
+syncronize||synchronize
 syncronizing||synchronizing
 syncronus||synchronous
 syste||system
@@ -1611,16 +1612,17 @@ sythesis||synthesis
 tagert||target
 taht||that
 tained||tainted
-tarffic||traffic
+tansition||transition
 tansmit||transmit
+tarffic||traffic
 targetted||targeted
 targetting||targeting
 taskelt||tasklet
 teh||the
 temeprature||temperature
 temorary||temporary
-temproarily||temporarily
 temperture||temperature
+temproarily||temporarily
 theads||threads
 therfore||therefore
 thier||their
@@ -1630,23 +1632,20 @@ threshhold||threshold
 thresold||threshold
 throtting||throttling
 throught||through
-tansition||transition
-trackling||tracking
-troughput||throughput
-trys||tries
 thses||these
-tiggers||triggers
 tiggered||triggered
 tiggerring||triggering
-tipically||typically
+tiggers||triggers
 timeing||timing
 timming||timing
 timout||timeout
+tipically||typically
 tmis||this
 tolarance||tolerance
 toogle||toggle
 torerable||tolerable
 torlence||tolerance
+trackling||tracking
 traget||target
 traking||tracking
 tramsmitted||transmitted
@@ -1670,20 +1669,20 @@ trasfer||transfer
 trasmission||transmission
 trasmitter||transmitter
 treshold||threshold
-trigged||triggered
-triggerd||triggered
 trigerred||triggered
 trigerring||triggering
+trigged||triggered
+triggerd||triggered
+troughput||throughput
 trun||turn
+trys||tries
 tunning||tuning
 ture||true
 tyep||type
 udpate||update
-updtes||updates
 uesd||used
-unknwon||unknown
 uknown||unknown
-usccess||success
+unamed||unnamed
 uncommited||uncommitted
 uncompatible||incompatible
 uncomressed||uncompressed
@@ -1692,6 +1691,7 @@ undeflow||underflow
 undelying||underlying
 underun||underrun
 unecessary||unnecessary
+uneeded||unneeded
 unexecpted||unexpected
 unexepected||unexpected
 unexpcted||unexpected
@@ -1700,26 +1700,24 @@ unexpeted||unexpected
 unexpexted||unexpected
 unfortunatelly||unfortunately
 unifiy||unify
-uniterrupted||uninterrupted
 uninterruptable||uninterruptible
 unintialized||uninitialized
+uniterrupted||uninterrupted
 unitialized||uninitialized
 unkmown||unknown
 unknonw||unknown
 unknouwn||unknown
 unknow||unknown
+unknwon||unknown
 unkown||unknown
-unamed||unnamed
-uneeded||unneeded
-unneded||unneeded
+unmached||unmatched
 unneccecary||unnecessary
 unneccesary||unnecessary
 unneccessary||unnecessary
 unnecesary||unnecessary
+unneded||unneeded
 unneedingly||unnecessarily
 unnsupported||unsupported
-unuspported||unsupported
-unmached||unmatched
 unprecise||imprecise
 unpriviledged||unprivileged
 unpriviliged||unprivileged
@@ -1727,18 +1725,21 @@ unregester||unregister
 unresgister||unregister
 unrgesiter||unregister
 unsinged||unsigned
-unstabel||unstable
-unsolicted||unsolicited
 unsolicitied||unsolicited
+unsolicted||unsolicited
+unstabel||unstable
 unsuccessfull||unsuccessful
 unsuported||unsupported
 untill||until
 ununsed||unused
 unuseful||useless
+unuspported||unsupported
 unvalid||invalid
 upate||update
+updtes||updates
 upsupported||unsupported
 upto||up to
+usccess||success
 useable||usable
 usefule||useful
 usefull||useful
@@ -1760,14 +1761,14 @@ variantions||variations
 varible||variable
 varient||variant
 vaule||value
-verbse||verbose
 veify||verify
+verbse||verbose
 verfication||verification
 veriosn||version
-versoin||version
 verisons||versions
 verison||version
 veritical||vertical
+versoin||version
 verson||version
 vicefersa||vice-versa
 virtal||virtual
@@ -1780,13 +1781,13 @@ wakeus||wakeups
 was't||wasn't
 wathdog||watchdog
 wating||waiting
-wiat||wait
 wether||whether
 whataver||whatever
 whcih||which
 whenver||whenever
 wheter||whether
 whe||when
+wiat||wait
 wierd||weird
 wihout||without
 wiil||will
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [LTP] [PATCH 2/4] checkpatch: Update to use new features
  2026-04-24  9:39 [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Petr Vorel
  2026-04-24  9:39 ` [LTP] [PATCH 1/4] Update spellings to next-20260423 Petr Vorel
@ 2026-04-24  9:39 ` Petr Vorel
  2026-04-24  9:39 ` [LTP] [PATCH 3/4] Add .checkpatch.conf for checkpatch.pl Petr Vorel
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2026-04-24  9:39 UTC (permalink / raw)
  To: ltp

Update checkpatch.pl to use new features:

596d45eb6a409 ("checkpatch: add option to not force /* */ for SPDX")
50fa4906c7465 ("checkpatch: allow passing config directory")

(Use latest next tree next-20260423 with applied 2 patches from Andrew
Morton's mm tree, which will be part of v7.1.)

https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/log/?h=mm-everything

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
NOTE: git hashes will probably change, I'll wait till it gets into
mainline (or at least into next tree) and update hashes before merge.

Kind regards,
Petr

 scripts/checkpatch.pl | 133 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 111 insertions(+), 22 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c70fcfbb3c..0d18771f1b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -57,8 +57,12 @@ my %ignore_type = ();
 my @ignore = ();
 my $help = 0;
 my $configuration_file = ".checkpatch.conf";
+my $def_configuration_dirs_help = '.:$HOME:.scripts';
+(my $def_configuration_dirs = $def_configuration_dirs_help) =~ s/\$(\w+)/$ENV{$1}/g;
+my $env_config_dir = 'CHECKPATCH_CONFIG_DIR';
 my $max_line_length = 100;
 my $ignore_perl_version = 0;
+my $spdx_cxx_comments = 0;
 my $minimum_perl_version = 5.10.0;
 my $min_conf_desc_length = 4;
 my $spelling_file = "$D/spelling.txt";
@@ -135,6 +139,10 @@ Options:
                              file.  It's your fault if there's no backup or git
   --ignore-perl-version      override checking of perl version.  expect
                              runtime errors.
+  --spdx-cxx-comments        don't force C comments (/* */) for SPDX license
+                             (required by old toolchains), allow also C++
+                             comments (//).
+                             NOTE: it should *not* be used for Linux mainline.
   --codespell                Use the codespell dictionary for spelling/typos
                              (default:$codespellfile)
   --codespellfile            Use this codespell dictionary
@@ -146,6 +154,11 @@ Options:
   -h, --help, --version      display this help and exit
 
 When FILE is - read standard input.
+
+CONFIGURATION FILE
+Default configuration options can be stored in $configuration_file,
+search path: '$def_configuration_dirs_help' or in a directory specified by
+\$$env_config_dir environment variable (fallback to the default search path).
 EOM
 
 	exit($exitcode);
@@ -237,7 +250,7 @@ sub list_types {
 	exit($exitcode);
 }
 
-my $conf = which_conf($configuration_file);
+my $conf = which_conf($configuration_file, $env_config_dir, $def_configuration_dirs);
 if (-f $conf) {
 	my @conf_args;
 	open(my $conffile, '<', "$conf")
@@ -339,6 +352,7 @@ GetOptions(
 	'fix!'		=> \$fix,
 	'fix-inplace!'	=> \$fix_inplace,
 	'ignore-perl-version!' => \$ignore_perl_version,
+	'spdx-cxx-comments!' => \$spdx_cxx_comments,
 	'debug=s'	=> \%debug,
 	'test-only=s'	=> \$tst_only,
 	'codespell!'	=> \$codespell,
@@ -641,6 +655,7 @@ our $signature_tags = qr{(?xi:
 	Reviewed-by:|
 	Reported-by:|
 	Suggested-by:|
+	Assisted-by:|
 	To:|
 	Cc:
 )};
@@ -1102,7 +1117,9 @@ our $declaration_macros = qr{(?x:
 	(?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
 	(?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(|
 	(?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(|
-	(?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(
+	(?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(|
+	__cacheline_group_(?:begin|end)(?:_aligned)?\s*\(|
+	__dma_from_device_group_(?:begin|end)\s*\(
 )};
 
 our %allow_repeated_words = (
@@ -1528,9 +1545,15 @@ sub which {
 }
 
 sub which_conf {
-	my ($conf) = @_;
+	my ($conf, $env_key, $paths) = @_;
+	my $env_dir = $ENV{$env_key};
+
+	if (defined($env_dir) && $env_dir ne "") {
+		return "$env_dir/$conf" if (-e "$env_dir/$conf");
+		warn "$P: Can't find a readable $conf in '$env_dir', falling back to default search paths\n";
+	}
 
-	foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) {
+	foreach my $path (split(/:/, $paths)) {
 		if (-e "$path/$conf") {
 			return "$path/$conf";
 		}
@@ -2926,7 +2949,7 @@ sub process {
 			}
 			$checklicenseline = 1;
 
-			if ($realfile !~ /^MAINTAINERS/) {
+			if ($realfile !~ /^(MAINTAINERS|dev\/null)/) {
 				my $last_binding_patch = $is_binding_patch;
 
 				$is_binding_patch = () = $realfile =~ m@^(?:Documentation/devicetree/|include/dt-bindings/)@;
@@ -3033,6 +3056,16 @@ sub process {
 			}
 		}
 
+# Check for invalid patch separator
+		if ($in_commit_log &&
+		    $line =~ /^---.+/) {
+			if (ERROR("BAD_COMMIT_SEPARATOR",
+				  "Invalid commit separator - some tools may have problems applying this\n" . $herecurr) &&
+			    $fix) {
+				$fixed[$fixlinenr] =~ s/-/=/g;
+			}
+		}
+
 # Check for patch separator
 		if ($line =~ /^---$/) {
 			$has_patch_separator = 1;
@@ -3093,6 +3126,15 @@ sub process {
 				}
 			}
 
+			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
+			if ($sign_off =~ /^Assisted-by:/i) {
+				if ($email !~ /^\S+:\S+/) {
+					WARN("BAD_SIGN_OFF",
+					     "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
+				}
+				next;
+			}
+
 			my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
 			my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
 			if ($suggested_email eq "") {
@@ -3779,26 +3821,33 @@ sub process {
 				$checklicenseline = 2;
 			} elsif ($rawline =~ /^\+/) {
 				my $comment = "";
-				if ($realfile =~ /\.(h|s|S)$/) {
-					$comment = '/*';
-				} elsif ($realfile =~ /\.(c|rs|dts|dtsi)$/) {
+				if ($realfile =~ /\.(c|rs|dts|dtsi)$/) {
 					$comment = '//';
 				} elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc|yaml)$/) {
 					$comment = '#';
 				} elsif ($realfile =~ /\.rst$/) {
 					$comment = '..';
 				}
+				my $pattern = qr{\Q$comment\E};
+				if ($realfile =~ /\.(h|s|S)$/) {
+					$comment = '/*';
+					$pattern = qr{/\*};
+					if ($spdx_cxx_comments) {
+						$comment = '// or /*';
+						$pattern = qr{//|/\*};
+					}
+				}
 
 # check SPDX comment style for .[chsS] files
 				if ($realfile =~ /\.[chsS]$/ &&
 				    $rawline =~ /SPDX-License-Identifier:/ &&
-				    $rawline !~ m@^\+\s*\Q$comment\E\s*@) {
+				    $rawline !~ m@^\+\s*$pattern\s*@) {
 					WARN("SPDX_LICENSE_TAG",
 					     "Improper SPDX comment style for '$realfile', please use '$comment' instead\n" . $herecurr);
 				}
 
 				if ($comment !~ /^$/ &&
-				    $rawline !~ m@^\+\Q$comment\E SPDX-License-Identifier: @) {
+				    $rawline !~ m@^\+$pattern SPDX-License-Identifier: @) {
 					WARN("SPDX_LICENSE_TAG",
 					     "Missing or malformed SPDX-License-Identifier tag in line $checklicenseline\n" . $herecurr);
 				} elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) {
@@ -3844,6 +3893,14 @@ sub process {
 			     "Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr);
 		}
 
+# check for disallowed SPDX file tags
+		if ($rawline =~ /\bSPDX-.*:/ &&
+		    $rawline !~ /\bSPDX-License-Identifier:/ &&
+		    $rawline !~ /\bSPDX-FileCopyrightText:/) {
+			WARN("SPDX_LICENSE_TAG",
+			     "Disallowed SPDX tag\n" . $herecurr);
+		}
+
 # line length limit (with some exclusions)
 #
 # There are a few types of lines that may extend beyond $max_line_length:
@@ -5648,9 +5705,7 @@ sub process {
 			my $comp = $3;
 			my $to = $4;
 			my $newcomp = $comp;
-
-			if ($const !~ /^\QTST_/ &&
-			    $lead !~ /(?:$Operators|\.)\s*$/ &&
+			if ($lead !~ /(?:$Operators|\.)\s*$/ &&
 			    $to !~ /^(?:Constant|[A-Z_][A-Z0-9_]*)$/ &&
 			    WARN("CONSTANT_COMPARISON",
 				 "Comparisons should place the constant on the right side of the test\n" . $herecurr) &&
@@ -6737,6 +6792,13 @@ sub process {
 			}
 		}
 
+# check for context_unsafe without a comment.
+		if ($line =~ /\bcontext_unsafe\b/ &&
+		    !ctx_has_comment($first_line, $linenr)) {
+			WARN("CONTEXT_UNSAFE",
+			     "context_unsafe without comment\n" . $herecurr);
+		}
+
 # check of hardware specific defines
 		if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) {
 			CHK("ARCH_DEFINES",
@@ -7142,7 +7204,7 @@ sub process {
 				if ($count == 1 &&
 				    $format =~ /^"\%(?i:ll[udxi]|[udxi]ll|ll|[hl]h?[udxi]|[udxi][hl]h?|[hl]h?|[udxi])"$/) {
 					WARN("SSCANF_TO_KSTRTO",
-					     "Prefer tst_parse_<type> to single variable sscanf\n" . "$here\n$stat_real\n");
+					     "Prefer kstrto<type> to single variable sscanf\n" . "$here\n$stat_real\n");
 				}
 			}
 		}
@@ -7262,17 +7324,42 @@ sub process {
 			    "Prefer $3(sizeof(*$1)...) over $3($4...)\n" . $herecurr);
 		}
 
-# check for (kv|k)[mz]alloc with multiplies that could be kmalloc_array/kvmalloc_array/kvcalloc/kcalloc
+# check for (kv|k)[mz]alloc that could be kmalloc_obj/kvmalloc_obj/kzalloc_obj/kvzalloc_obj
+		if ($perl_version_ok &&
+		    defined $stat &&
+		    $stat =~ /^\+\s*($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k)[mz]alloc)\s*\(\s*($FuncArg)\s*,/) {
+			my $oldfunc = $3;
+			my $a1 = $4;
+			my $newfunc = "kmalloc_obj";
+			$newfunc = "kvmalloc_obj" if ($oldfunc eq "kvmalloc");
+			$newfunc = "kvzalloc_obj" if ($oldfunc eq "kvzalloc");
+			$newfunc = "kzalloc_obj" if ($oldfunc eq "kzalloc");
+
+			if ($a1 =~ s/^sizeof\s*\S\(?([^\)]*)\)?$/$1/) {
+				my $cnt = statement_rawlines($stat);
+				my $herectx = get_stat_here($linenr, $cnt, $here);
+
+				if (WARN("ALLOC_WITH_SIZEOF",
+					 "Prefer $newfunc over $oldfunc with sizeof\n" . $herectx) &&
+				    $cnt == 1 &&
+				    $fix) {
+					$fixed[$fixlinenr] =~ s/\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k)[mz]alloc)\s*\(\s*($FuncArg)\s*,/$1 = $newfunc($a1,/;
+				}
+			}
+		}
+
+
+# check for (kv|k)[mz]alloc with multiplies that could be kmalloc_objs/kvmalloc_objs/kzalloc_objs/kvzalloc_objs
 		if ($perl_version_ok &&
 		    defined $stat &&
 		    $stat =~ /^\+\s*($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k)[mz]alloc)\s*\(\s*($FuncArg)\s*\*\s*($FuncArg)\s*,/) {
 			my $oldfunc = $3;
 			my $a1 = $4;
 			my $a2 = $10;
-			my $newfunc = "kmalloc_array";
-			$newfunc = "kvmalloc_array" if ($oldfunc eq "kvmalloc");
-			$newfunc = "kvcalloc" if ($oldfunc eq "kvzalloc");
-			$newfunc = "kcalloc" if ($oldfunc eq "kzalloc");
+			my $newfunc = "kmalloc_objs";
+			$newfunc = "kvmalloc_objs" if ($oldfunc eq "kvmalloc");
+			$newfunc = "kvzalloc_objs" if ($oldfunc eq "kvzalloc");
+			$newfunc = "kzalloc_objs" if ($oldfunc eq "kzalloc");
 			my $r1 = $a1;
 			my $r2 = $a2;
 			if ($a1 =~ /^sizeof\s*\S/) {
@@ -7288,7 +7375,9 @@ sub process {
 					 "Prefer $newfunc over $oldfunc with multiply\n" . $herectx) &&
 				    $cnt == 1 &&
 				    $fix) {
-					$fixed[$fixlinenr] =~ s/\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k)[mz]alloc)\s*\(\s*($FuncArg)\s*\*\s*($FuncArg)/$1 . ' = ' . "$newfunc(" . trim($r1) . ', ' . trim($r2)/e;
+					my $sized = trim($r2);
+					$sized =~ s/^sizeof\s*\S\(?([^\)]*)\)?$/$1/;
+					$fixed[$fixlinenr] =~ s/\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k)[mz]alloc)\s*\(\s*($FuncArg)\s*\*\s*($FuncArg)/$1 . ' = ' . "$newfunc(" . $sized . ', ' . trim($r1)/e;
 				}
 			}
 		}
@@ -7458,10 +7547,10 @@ sub process {
 		}
 
 # check for various structs that are normally const (ops, kgdb, device_tree)
-# and avoid what seem like struct definitions 'struct foo {'
+# and avoid what seem like struct definitions 'struct foo {' or forward declarations 'struct foo;'
 		if (defined($const_structs) &&
 		    $line !~ /\bconst\b/ &&
-		    $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
+		    $line =~ /\bstruct\s+($const_structs)\b(?!\s*[\{;])/) {
 			WARN("CONST_STRUCT",
 			     "struct $1 should normally be const\n" . $herecurr);
 		}
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [LTP] [PATCH 3/4] Add .checkpatch.conf for checkpatch.pl
  2026-04-24  9:39 [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Petr Vorel
  2026-04-24  9:39 ` [LTP] [PATCH 1/4] Update spellings to next-20260423 Petr Vorel
  2026-04-24  9:39 ` [LTP] [PATCH 2/4] checkpatch: Update to use new features Petr Vorel
@ 2026-04-24  9:39 ` Petr Vorel
  2026-04-24  9:39 ` [LTP] [PATCH 4/4] checkpatch: Enable more checks, disable ENOSYS Petr Vorel
  2026-04-24 11:57 ` [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Ricardo B. Marlière via ltp
  4 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2026-04-24  9:39 UTC (permalink / raw)
  To: ltp; +Cc: Ricardo B. Marlière

This helps to remove duplicity because checkpatch.pl is used in 'make
check' and in b4 config.

b4 uses some specific flags --mailback --showfile.

For make check use $CHECKPATCH_CONFIG_DIR (new feature from previous
commit) to pass config file in the root directory. b4 is already run
from the root directory therefore it does not need it (script uses
default search path: '.:$HOME:.scripts'.

For some reason CAMELCASE check now creates a file with camel case variables:
.checkpatch-camelcase.git.70caa71934, add it to the top level .gitignore.

Document at least some options in .checkpatch.conf.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
There should not be any functional change other that camelcase file.
Cc b4 users :)

 .b4-config             |  5 +++--
 .checkpatch.conf       | 13 +++++++++++++
 .gitignore             |  3 +++
 include/mk/env_post.mk |  2 +-
 4 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100644 .checkpatch.conf

diff --git a/.b4-config b/.b4-config
index da805a8a6b..ff3199624c 100644
--- a/.b4-config
+++ b/.b4-config
@@ -4,6 +4,7 @@
     send-series-to = Linux Test Project <ltp@lists.linux.it>
     pw-url = https://patchwork.ozlabs.org/
     pw-project = ltp
-    prep-perpatch-check-cmd = ./scripts/checkpatch.pl -q --terse --no-summary --mailback --showfile --no-tree --strict --ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING,STRCPY,STRLCPY,STRNCPY
-    am-perpatch-check-cmd = ./scripts/checkpatch.pl -q --terse --no-summary --mailback --no-tree --strict --ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING,STRCPY,STRLCPY,STRNCPY
 
+    # other checkpatch.pl options from .checkpatch.conf are used
+    prep-perpatch-check-cmd = ./scripts/checkpatch.pl -q --mailback --showfile
+    am-perpatch-check-cmd = ./scripts/checkpatch.pl -q --mailback
diff --git a/.checkpatch.conf b/.checkpatch.conf
new file mode 100644
index 0000000000..20b92aaca9
--- /dev/null
+++ b/.checkpatch.conf
@@ -0,0 +1,13 @@
+# Not Linux, so don't expect a Linux tree.
+--no-tree
+
+-f --terse --no-summary
+
+# enable more tests
+--strict
+
+# kernel specific
+--ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY
+
+# TODO: document reason
+--ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING
diff --git a/.gitignore b/.gitignore
index 3fdfeaba03..f034ca1647 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,6 @@ logfile.*
 
 compile_flags.txt
 compile_commands.json
+
+# added by scripts/checkpatch.pl
+.checkpatch-camelcase.*
diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index dcb0bbc6c5..1b0d3a2a8e 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -73,7 +73,7 @@ CHECK_TARGETS			?= $(addprefix check-,$(notdir $(patsubst %.c,%,$(sort $(wildcar
 CHECK_TARGETS			:= $(filter-out $(addprefix check-, $(FILTER_OUT_MAKE_TARGETS)), $(CHECK_TARGETS))
 CHECK_HEADER_TARGETS		?= $(addprefix check-,$(notdir $(sort $(wildcard $(abs_srcdir)/*.h))))
 CHECK				?= $(abs_top_srcdir)/tools/sparse/sparse-ltp
-CHECK_NOFLAGS			?= $(abs_top_srcdir)/scripts/checkpatch.pl -f --no-tree --terse --no-summary --strict --ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING,STRCPY,STRLCPY,STRNCPY
+CHECK_NOFLAGS			?= CHECKPATCH_CONFIG_DIR="$(abs_top_srcdir)" $(abs_top_srcdir)/scripts/checkpatch.pl -f
 SHELL_CHECK			?= $(abs_top_srcdir)/scripts/checkbashisms.pl --force --extra
 SHELL_CHECK_TARGETS		?= $(addprefix check-,$(notdir $(sort $(wildcard $(abs_srcdir)/*.sh))))
 
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [LTP] [PATCH 4/4] checkpatch: Enable more checks, disable ENOSYS
  2026-04-24  9:39 [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Petr Vorel
                   ` (2 preceding siblings ...)
  2026-04-24  9:39 ` [LTP] [PATCH 3/4] Add .checkpatch.conf for checkpatch.pl Petr Vorel
@ 2026-04-24  9:39 ` Petr Vorel
  2026-04-24 11:57 ` [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Ricardo B. Marlière via ltp
  4 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2026-04-24  9:39 UTC (permalink / raw)
  To: ltp

Use --spdx-cxx-comments (new feature from previous commit) to avoid
false positive errors:
  tst_safe_clocks.h:1: WARNING: Improper SPDX comment style for 'tst_safe_clocks.h', please use '/*' instead
  tst_safe_clocks.h:1: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1

Disable checks (via --ignore) to avoid false positive errors:
* ENOSYS
  fallocate01.c:230: WARNING: ENOSYS means 'invalid syscall nr' and nothing else

Add new checks:
* CONCATENATED_STRING
  lib/tst_test.c:200: CHECK: Concatenated strings should use spaces between elements

* PARENTHESIS_ALIGNMENT
  lib/tst_kconfig.c:180: CHECK: Alignment should match open parenthesis

* SPACING (https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces)
  lib/tst_kconfig.c:383: CHECK: spaces preferred around that '-' (ctx:VxV)
  lib/tst_test.c:1900: CHECK: spaces preferred around that '/' (ctx:VxV)
  tst_minmax.h:15: CHECK: No space is necessary after a cast

* SPLIT_STRING
  lib/tst_test.c:1951: WARNING: quoted string split across lines

* UNNECESSARY_PARENTHESES
  lib/tst_test.c:802: CHECK: Unnecessary parentheses around toptions[i].arg

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .checkpatch.conf | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.checkpatch.conf b/.checkpatch.conf
index 20b92aaca9..41b2a6ee18 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -3,6 +3,9 @@
 
 -f --terse --no-summary
 
+# allow // in headers
+--spdx-cxx-comments
+
 # enable more tests
 --strict
 
@@ -10,4 +13,7 @@
 --ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY
 
 # TODO: document reason
---ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING
+--ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS
+
+# ENOSYS is used in test error macros
+--ignore ENOSYS
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [LTP] Update spellings to next-20260423
  2026-04-24  9:39 ` [LTP] [PATCH 1/4] Update spellings to next-20260423 Petr Vorel
@ 2026-04-24 10:25   ` linuxtestproject.agent
  2026-04-24 11:36     ` Petr Vorel
  0 siblings, 1 reply; 10+ messages in thread
From: linuxtestproject.agent @ 2026-04-24 10:25 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi Petr,

--- [PATCH 4/4] ---

On 2026-04-24, Petr Vorel wrote:
> checkpatch: Enable more checks, disable ENOSYS

> -# TODO: document reason
> ---ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING
> +--ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS

PREFER_KERNEL_TYPES is already listed in the "kernel specific" --ignore block
added in patch 3/4. Remove it from this line to avoid the duplicate.

---
Note:

Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/24884570475

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] Update spellings to next-20260423
  2026-04-24 10:25   ` [LTP] " linuxtestproject.agent
@ 2026-04-24 11:36     ` Petr Vorel
  2026-04-28  7:22       ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2026-04-24 11:36 UTC (permalink / raw)
  To: linuxtestproject.agent; +Cc: ltp

> Hi Petr,

> --- [PATCH 4/4] ---

> On 2026-04-24, Petr Vorel wrote:
> > checkpatch: Enable more checks, disable ENOSYS

> > -# TODO: document reason
> > ---ignore CONST_STRUCT,VOLATILE,SPLIT_STRING,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,SPACING,MULTIPLE_ASSIGNMENTS,UNNECESSARY_PARENTHESES,PARENTHESIS_ALIGNMENT,CONCATENATED_STRING
> > +--ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS

> PREFER_KERNEL_TYPES is already listed in the "kernel specific" --ignore block
> added in patch 3/4. Remove it from this line to avoid the duplicate.

+1 valid!

If that's the only change, I'd amend this commit before merge.

Kind regards,
Petr

+++ .checkpatch.conf
@@ -13,7 +13,7 @@
 --ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY
 
 # TODO: document reason
---ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,PREFER_KERNEL_TYPES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS
+--ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS
 
 # ENOSYS is used in test error macros
 --ignore ENOSYS

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf
  2026-04-24  9:39 [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Petr Vorel
                   ` (3 preceding siblings ...)
  2026-04-24  9:39 ` [LTP] [PATCH 4/4] checkpatch: Enable more checks, disable ENOSYS Petr Vorel
@ 2026-04-24 11:57 ` Ricardo B. Marlière via ltp
  2026-04-29  8:06   ` Petr Vorel
  4 siblings, 1 reply; 10+ messages in thread
From: Ricardo B. Marlière via ltp @ 2026-04-24 11:57 UTC (permalink / raw)
  To: Petr Vorel, ltp; +Cc: ltp

On Fri Apr 24, 2026 at 6:39 AM -03, Petr Vorel wrote:
> Enhancement to reduce duplicity + add more checks.
>
> Petr Vorel (4):
>   Update spellings to next-20260423
>   checkpatch: Update to use new features
>   Add .checkpatch.conf for checkpatch.pl
>   checkpatch: Enable more checks, disable ENOSYS
>
>  .b4-config             |   5 +-
>  .checkpatch.conf       |  19 +++
>  .gitignore             |   3 +
>  include/mk/env_post.mk |   2 +-
>  scripts/checkpatch.pl  | 133 ++++++++++++++---
>  scripts/spelling.txt   | 331 +++++++++++++++++++++--------------------
>  6 files changed, 303 insertions(+), 190 deletions(-)
>  create mode 100644 .checkpatch.conf

Nice improvement, thanks!

Reviewed-by: Ricardo B. Marlière <rbm@suse.com>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] Update spellings to next-20260423
  2026-04-24 11:36     ` Petr Vorel
@ 2026-04-28  7:22       ` Andrea Cervesato via ltp
  0 siblings, 0 replies; 10+ messages in thread
From: Andrea Cervesato via ltp @ 2026-04-28  7:22 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp, linuxtestproject.agent

Hi Petr,

you can merged the patch with the suggested agent modification.

Acked-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf
  2026-04-24 11:57 ` [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Ricardo B. Marlière via ltp
@ 2026-04-29  8:06   ` Petr Vorel
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2026-04-29  8:06 UTC (permalink / raw)
  To: Ricardo B. Marlière; +Cc: ltp

Hi all,

FYI patchset merged.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-04-29  8:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24  9:39 [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Petr Vorel
2026-04-24  9:39 ` [LTP] [PATCH 1/4] Update spellings to next-20260423 Petr Vorel
2026-04-24 10:25   ` [LTP] " linuxtestproject.agent
2026-04-24 11:36     ` Petr Vorel
2026-04-28  7:22       ` Andrea Cervesato via ltp
2026-04-24  9:39 ` [LTP] [PATCH 2/4] checkpatch: Update to use new features Petr Vorel
2026-04-24  9:39 ` [LTP] [PATCH 3/4] Add .checkpatch.conf for checkpatch.pl Petr Vorel
2026-04-24  9:39 ` [LTP] [PATCH 4/4] checkpatch: Enable more checks, disable ENOSYS Petr Vorel
2026-04-24 11:57 ` [LTP] [PATCH 0/4] checkpatch: Add .checkpatch.conf Ricardo B. Marlière via ltp
2026-04-29  8:06   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox