Re: [PATCH v2] Staging: nvec: Convert to_nvec_led from a macro to an inline function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 20, 2023 at 01:44:22AM -0700, Sumitra Sharma wrote:
> On Mon, Mar 20, 2023 at 08:39:49AM +0300, Dan Carpenter wrote:
> > On Sat, Mar 18, 2023 at 10:52:50AM -0700, Sumitra Sharma wrote:
> > > Convert to_nvec_led from a macro to a static inline function, to make the
> > > relevant types apparent in the definition and to benefit from the type
> > > checking performed by the compiler at call sites.
> > > 
> > > Signed-off-by: Sumitra Sharma <sumitraartsy@xxxxxxxxx>
> > > ---
> > 
> > You need to compile test your changes.
> >
> 
> Hi dan,
> 
> I am facing problems in creating modules and in compiling them.
> 
> Any help in this would be appreciated. Here is the link to the thread
> https://lore.kernel.org/outreachy/alpine.DEB.2.22.394.2303191336090.2867@hadrien/T/#t

If you're editing a .h file then you need to compile all the stuff which
includes it.  It's slightly complicated.  But if you're just editing a
.c file like here then what I do is I have use my Smatch script to try
compile it.

In Debian run:
apt-get install gcc make sqlite3 libsqlite3-dev libdbd-sqlite3-perl libssl-dev libtry-tiny-perl
Or in Fedora run:
yum install gcc make sqlite3 sqlite-devel sqlite perl-DBD-SQLite openssl-devel perl-Try-Tiny

git clone https://github.com/error27/smatch.git
cd smatch
make

cd /path/to/kernel_src/
~/smatch/smatch_scripts/kchecker drivers/staging/nvec/nvec_paz00.c

Also I run Sparse on the file.
~/smatch/smatch_scripts/kchecker --sparse drivers/staging/nvec/nvec_paz00.c

When I'm patching a file, then I like to look at any other issues I
might want to fix and deal with that as well.

regards,
dan carpenter




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux