Re: [PATCH] Staging: comedi: drivers: fixed errors warning coding style issue

2020-02-18 Thread Dan Carpenter
On Sun, Feb 16, 2020 at 01:45:18PM +0530, sunnypranay wrote:
> Fixed a coding style issue.

What issue is that?

> 
> Signed-off-by: sunnypranay 

This doesn't seem like a Formal Name that you would use to sign legal
documents.

> ---
>  drivers/staging/comedi/drivers.c | 18 +++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers.c 
> b/drivers/staging/comedi/drivers.c
> index 750a6ff3c03c..76395de100a6 100644
> --- a/drivers/staging/comedi/drivers.c
> +++ b/drivers/staging/comedi/drivers.c
> @@ -133,7 +133,7 @@ EXPORT_SYMBOL_GPL(comedi_alloc_subdevices);
>   * On success, @s->readback points to the first element of the array, which
>   * is zero-filled.  The low-level driver is responsible for updating its
>   * contents.  @s->insn_read will be set to comedi_readback_insn_read()
> - * unless it is already non-NULL.
> + * Unless it is already non-NULL.

The original capitalization was correct.  It should be lower case.

>   *
>   * Returns 0 on success, -EINVAL if the subdevice has no channels, or
>   * -ENOMEM on allocation failure.
> @@ -282,8 +282,20 @@ EXPORT_SYMBOL_GPL(comedi_readback_insn_read);
>   * continue waiting or some other value to stop waiting (generally 0 if the
>   * condition occurred, or some error value).
>   *
> - * Returns -ETIMEDOUT if timed out, otherwise the return value from the
> - * callback function.
> + * Redback_insn_read() - A generic (*insn_read) for subdevice readback.
  ^
What is this???

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:driver-core-testing] BUILD SUCCESS 99c73ce158a44a1a11cb146062bc32df0c1d95db

2020-02-18 Thread kbuild test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git  
driver-core-testing
branch HEAD: 99c73ce158a44a1a11cb146062bc32df0c1d95db  drivers 
base/arch_topology: Reformat topology_get_[cpu/freq]_scale() function name

elapsed time: 4978m

configs tested: 200
configs skipped: 0

The following configs have been built successfully.
More configs may be tested in the coming days.

arm64allyesconfig
arm  allyesconfig
arm64allmodconfig
arm  allmodconfig
arm64 allnoconfig
arm   allnoconfig
arm at91_dt_defconfig
arm   efm32_defconfig
arm  exynos_defconfig
armmulti_v5_defconfig
armmulti_v7_defconfig
armshmobile_defconfig
arm   sunxi_defconfig
arm64   defconfig
sparcallyesconfig
h8300   h8s-sim_defconfig
mips  malta_kvm_defconfig
openriscor1ksim_defconfig
s390defconfig
um   x86_64_defconfig
c6xevmc6678_defconfig
cskydefconfig
powerpc   ppc64_defconfig
i386defconfig
s390 allmodconfig
alpha   defconfig
i386  allnoconfig
mips allmodconfig
ia64 allmodconfig
riscv allnoconfig
i386 alldefconfig
i386 allyesconfig
ia64 alldefconfig
ia64  allnoconfig
ia64 allyesconfig
ia64defconfig
c6x  allyesconfig
nios2 10m50_defconfig
nios2 3c120_defconfig
openrisc simple_smp_defconfig
xtensa   common_defconfig
xtensa  iss_defconfig
nds32 allnoconfig
nds32   defconfig
h8300 edosk2674_defconfig
h8300h8300h-sim_defconfig
m68k allmodconfig
m68k   m5475evb_defconfig
m68k  multi_defconfig
m68k   sun3_defconfig
arc  allyesconfig
arc defconfig
microblaze  mmu_defconfig
microblazenommu_defconfig
powerpc   allnoconfig
powerpc defconfig
powerpc  rhel-kconfig
mips   32r2_defconfig
mips 64r6el_defconfig
mips  allnoconfig
mips allyesconfig
mips  fuloong2e_defconfig
pariscallnoconfig
parisc   allyesconfig
pariscgeneric-32bit_defconfig
pariscgeneric-64bit_defconfig
x86_64   randconfig-a001-20200218
x86_64   randconfig-a002-20200218
x86_64   randconfig-a003-20200218
i386 randconfig-a001-20200218
i386 randconfig-a002-20200218
i386 randconfig-a003-20200218
alpharandconfig-a001-20200214
m68k randconfig-a001-20200214
mips randconfig-a001-20200214
nds32randconfig-a001-20200214
parisc   randconfig-a001-20200214
alpharandconfig-a001-20200218
m68k randconfig-a001-20200218
mips randconfig-a001-20200218
nds32randconfig-a001-20200218
parisc   randconfig-a001-20200218
riscvrandconfig-a001-20200218
csky randconfig-a001-20200214
openrisc randconfig-a001-20200214
s390 randconfig-a001-20200214
sh   randconfig-a001-20200214
xtensa   randconfig-a001-20200214
x86_64   randconfig-b001-20200218
x86_64   randconfig-b002-20200218
x86_64   randconfig-b003-20200218
i386 randconfig-b001-20200218
i386 randconfig-b002-20200218
i386 randconfig-b003-20200218
x86_64   randconfig-b001-20200214
x86_64   randconfig-b002-20200214
x86_64   randconfig-b003-20200214
i386 randconfig-b001-20200214
i386 randconfig-b002-20200214
i386 randconfig-b003

[PATCH] staging: bcm2835-camera: call function instead of macro

2020-02-18 Thread Kaaira Gupta
Fix checkpatch.pl warning of 'macro argument reuse' in bcm2835-camera.h
by removing the macro and calling the function, written in macro in
bcm2835-camera.h, directly in bcm2835-camera.c

Signed-off-by: Kaaira Gupta 
---
 .../bcm2835-camera/bcm2835-camera.c   | 28 +++
 .../bcm2835-camera/bcm2835-camera.h   | 10 ---
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c 
b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 1ef31a984741..19b3ba80d0e7 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -919,9 +919,17 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void 
*priv,
else
f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
f->fmt.pix.priv = 0;
-
-   v4l2_dump_pix_format(1, bcm2835_v4l2_debug, &dev->v4l2_dev, &f->fmt.pix,
-__func__);
+   v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
+"%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 
0x%x priv %u\n",
+ __func__,
+(&f->fmt.pix)->width,
+(&f->fmt.pix)->height,
+(&f->fmt.pix)->field,
+(&f->fmt.pix)->pixelformat,
+(&f->fmt.pix)->bytesperline,
+(&f->fmt.pix)->sizeimage,
+(&f->fmt.pix)->colorspace,
+(&f->fmt.pix)->priv);
return 0;
 }
 
@@ -995,9 +1003,17 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void 
*priv,
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
 "Now %dx%d format %08X\n",
f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.pixelformat);
-
-   v4l2_dump_pix_format(1, bcm2835_v4l2_debug, &dev->v4l2_dev, &f->fmt.pix,
-__func__);
+   v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
+"%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 
0x%x priv %u\n",
+__func__,
+(&f->fmt.pix)->width,
+(&f->fmt.pix)->height,
+(&f->fmt.pix)->field,
+(&f->fmt.pix)->pixelformat,
+(&f->fmt.pix)->bytesperline,
+(&f->fmt.pix)->sizeimage,
+(&f->fmt.pix)->colorspace,
+(&f->fmt.pix)->priv);
return 0;
 }
 
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h 
b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
index b5fce38de038..2e3e1954e3ce 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
@@ -121,16 +121,6 @@ int set_framerate_params(struct bm2835_mmal_dev *dev);
 
 /* Debug helpers */
 
-#define v4l2_dump_pix_format(level, debug, dev, pix_fmt, desc) \
-{  \
-   v4l2_dbg(level, debug, dev, \
-"%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 0x%x priv %u\n", 
\
-   desc,   \
-   (pix_fmt)->width, (pix_fmt)->height, (pix_fmt)->field,  \
-   (pix_fmt)->pixelformat, (pix_fmt)->bytesperline,\
-   (pix_fmt)->sizeimage, (pix_fmt)->colorspace, (pix_fmt)->priv); \
-}
-
 #define v4l2_dump_win_format(level, debug, dev, win_fmt, desc) \
 {  \
v4l2_dbg(level, debug, dev, \
-- 
2.17.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: bcm2835-camera: call function instead of macro

2020-02-18 Thread Dan Carpenter
On Tue, Feb 18, 2020 at 09:37:28PM +0530, Kaaira Gupta wrote:
> Fix checkpatch.pl warning of 'macro argument reuse' in bcm2835-camera.h
> by removing the macro and calling the function, written in macro in
> bcm2835-camera.h, directly in bcm2835-camera.c
> 
> Signed-off-by: Kaaira Gupta 
> ---
>  .../bcm2835-camera/bcm2835-camera.c   | 28 +++
>  .../bcm2835-camera/bcm2835-camera.h   | 10 ---
>  2 files changed, 22 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c 
> b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index 1ef31a984741..19b3ba80d0e7 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -919,9 +919,17 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void 
> *priv,
>   else
>   f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
>   f->fmt.pix.priv = 0;
> -
> - v4l2_dump_pix_format(1, bcm2835_v4l2_debug, &dev->v4l2_dev, &f->fmt.pix,
> -  __func__);
> + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
> +  "%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 
> 0x%x priv %u\n",
> +   __func__,
> +  (&f->fmt.pix)->width,
> +  (&f->fmt.pix)->height,
> +  (&f->fmt.pix)->field,
> +  (&f->fmt.pix)->pixelformat,
> +  (&f->fmt.pix)->bytesperline,
> +  (&f->fmt.pix)->sizeimage,
> +  (&f->fmt.pix)->colorspace,
> +  (&f->fmt.pix)->priv);

This is not as nice to look at as the original.  Just ignore the
warning.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Cursos Bonificables (Febrero 2020)

2020-02-18 Thread FOESCO
Buenos días



Os informamos que se encuentra abierto el plazo de inscripción para la presente 
Convocatoria de Cursos Bonificables para empleados (Febrero 2020)

Todos los cursos son totalmente Bonificables con cargo al Crédito de Formación 
2020 que disponen las empresas.


Deseáis que os mandemos la información?


Saludos.


Alex Pons
Director departamento formación.

FOESCO Formación Estatal Continua.
Entidad Organizadora: B171823AP
www.foesco.com

e-mail: cur...@foesco.net
Tel: 910 323 794


(Horario de 9h a 15h y de 17h a 20h de Lunes a Viernes)


FOESCO ofrece formación a empresas y trabajadores en activo a través de cursos 
bonificados por la Fundación Estatal para la Formación en el Empleo (antiguo 
FORCEM) que gestiona las acciones formativas de FORMACIÓN CONTINUA para 
trabajadores y se rige por la ley 30/2015 de 9 de Septiembre.

Si no desea recibir mas información de FOESCO responda a este correo con la 
palabra BAJA en el asunto.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: bcm2835-camera: call function instead of macro

2020-02-18 Thread Kaaira Gupta
On Tue, Feb 18, 2020 at 09:37:11PM +0300, Dan Carpenter wrote:
> On Tue, Feb 18, 2020 at 09:37:28PM +0530, Kaaira Gupta wrote:
> > Fix checkpatch.pl warning of 'macro argument reuse' in bcm2835-camera.h
> > by removing the macro and calling the function, written in macro in
> > bcm2835-camera.h, directly in bcm2835-camera.c
> > 
> > Signed-off-by: Kaaira Gupta 
> > ---
> >  .../bcm2835-camera/bcm2835-camera.c   | 28 +++
> >  .../bcm2835-camera/bcm2835-camera.h   | 10 ---
> >  2 files changed, 22 insertions(+), 16 deletions(-)
> > 
> > diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c 
> > b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > index 1ef31a984741..19b3ba80d0e7 100644
> > --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > @@ -919,9 +919,17 @@ static int vidioc_g_fmt_vid_cap(struct file *file, 
> > void *priv,
> > else
> > f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
> > f->fmt.pix.priv = 0;
> > -
> > -   v4l2_dump_pix_format(1, bcm2835_v4l2_debug, &dev->v4l2_dev, &f->fmt.pix,
> > -__func__);
> > +   v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
> > +"%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 
> > 0x%x priv %u\n",
> > + __func__,
> > +(&f->fmt.pix)->width,
> > +(&f->fmt.pix)->height,
> > +(&f->fmt.pix)->field,
> > +(&f->fmt.pix)->pixelformat,
> > +(&f->fmt.pix)->bytesperline,
> > +(&f->fmt.pix)->sizeimage,
> > +(&f->fmt.pix)->colorspace,
> > +(&f->fmt.pix)->priv);
> 
> This is not as nice to look at as the original.  Just ignore the
> warning.
> 
> regards,
> dan carpenter
>
So, is this warning to be ignored from everywhere in every driver, as it
doesn't look good? And if yes, then why is it there in the first place?

Thanks!
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: bcm2835-camera: call function instead of macro

2020-02-18 Thread Dan Carpenter
On Wed, Feb 19, 2020 at 12:47:47AM +0530, Kaaira Gupta wrote:
> On Tue, Feb 18, 2020 at 09:37:11PM +0300, Dan Carpenter wrote:
> > On Tue, Feb 18, 2020 at 09:37:28PM +0530, Kaaira Gupta wrote:
> > > Fix checkpatch.pl warning of 'macro argument reuse' in bcm2835-camera.h
> > > by removing the macro and calling the function, written in macro in
> > > bcm2835-camera.h, directly in bcm2835-camera.c
> > > 
> > > Signed-off-by: Kaaira Gupta 
> > > ---
> > >  .../bcm2835-camera/bcm2835-camera.c   | 28 +++
> > >  .../bcm2835-camera/bcm2835-camera.h   | 10 ---
> > >  2 files changed, 22 insertions(+), 16 deletions(-)
> > > 
> > > diff --git 
> > > a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c 
> > > b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > > index 1ef31a984741..19b3ba80d0e7 100644
> > > --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > > +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > > @@ -919,9 +919,17 @@ static int vidioc_g_fmt_vid_cap(struct file *file, 
> > > void *priv,
> > >   else
> > >   f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
> > >   f->fmt.pix.priv = 0;
> > > -
> > > - v4l2_dump_pix_format(1, bcm2835_v4l2_debug, &dev->v4l2_dev, &f->fmt.pix,
> > > -  __func__);
> > > + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
> > > +  "%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 
> > > 0x%x priv %u\n",
> > > +   __func__,
> > > +  (&f->fmt.pix)->width,
> > > +  (&f->fmt.pix)->height,
> > > +  (&f->fmt.pix)->field,
> > > +  (&f->fmt.pix)->pixelformat,
> > > +  (&f->fmt.pix)->bytesperline,
> > > +  (&f->fmt.pix)->sizeimage,
> > > +  (&f->fmt.pix)->colorspace,
> > > +  (&f->fmt.pix)->priv);
> > 
> > This is not as nice to look at as the original.  Just ignore the
> > warning.
> > 
> > regards,
> > dan carpenter
> >
> So, is this warning to be ignored from everywhere in every driver, as it
> doesn't look good? And if yes, then why is it there in the first place?

Obviously the reason for the warning is a good idea.  Do a google
search for the dangers of c macros if you don't understand.

But at the same time uniformity and clean code is nice so it's a matter
of setting priorities.  Checkpatch is just a Perl script and not the
King of The World.  We can ignore it if we want to.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH] staging: exfat: remove symlink feature.

2020-02-18 Thread Tetsuhiro Kohada
Remove symlink feature completely.

Becouse
-Uses reserved areas(defined in the Microsoft exfat specification), causing 
future incompatibilities.
-Not described in Microsoft exfat specifications or SD standards.
-For REMOVABLE media, causes incompatibility with other implementations.
-Not supported by other major exfat drivers.
-Not implemented symlink feature in linux FAT/VFAT.

Remove this feature completely because of serious media compatibility issues.
(Can't enable even with CONFIG)

If you have any questions about this patch, please let me know.

Reviewed-by: Takahiro Mori 
Signed-off-by: Tetsuhiro Kohada 
---
 drivers/staging/exfat/exfat_super.c | 450 
 1 file changed, 450 deletions(-)

diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index b398114c2604..c7bc07e91c45 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -660,375 +660,6 @@ static int ffsCreateFile(struct inode *inode, char *path, 
u8 mode,
return ret;
 }
 
-static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void 
*buffer,
-  u64 count, u64 *rcount)
-{
-   s32 offset, sec_offset, clu_offset;
-   u32 clu;
-   int ret = 0;
-   sector_t LogSector;
-   u64 oneblkread, read_bytes;
-   struct buffer_head *tmp_bh = NULL;
-   struct super_block *sb = inode->i_sb;
-   struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
-   struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
-
-   /* check the validity of the given file id */
-   if (!fid)
-   return -EINVAL;
-
-   /* check the validity of pointer parameters */
-   if (!buffer)
-   return -EINVAL;
-
-   /* acquire the lock for file system critical section */
-   mutex_lock(&p_fs->v_mutex);
-
-   /* check if the given file ID is opened */
-   if (fid->type != TYPE_FILE) {
-   ret = -EPERM;
-   goto out;
-   }
-
-   if (fid->rwoffset > fid->size)
-   fid->rwoffset = fid->size;
-
-   if (count > (fid->size - fid->rwoffset))
-   count = fid->size - fid->rwoffset;
-
-   if (count == 0) {
-   if (rcount)
-   *rcount = 0;
-   ret = 0;
-   goto out;
-   }
-
-   read_bytes = 0;
-
-   while (count > 0) {
-   clu_offset = (s32)(fid->rwoffset >> p_fs->cluster_size_bits);
-   clu = fid->start_clu;
-
-   if (fid->flags == 0x03) {
-   clu += clu_offset;
-   } else {
-   /* hint information */
-   if ((clu_offset > 0) && (fid->hint_last_off > 0) &&
-   (clu_offset >= fid->hint_last_off)) {
-   clu_offset -= fid->hint_last_off;
-   clu = fid->hint_last_clu;
-   }
-
-   while (clu_offset > 0) {
-   /* clu = exfat_fat_read(sb, clu); */
-   if (exfat_fat_read(sb, clu, &clu) == -1) {
-   ret = -EIO;
-   goto out;
-   }
-
-   clu_offset--;
-   }
-   }
-
-   /* hint information */
-   fid->hint_last_off = (s32)(fid->rwoffset >>
-  p_fs->cluster_size_bits);
-   fid->hint_last_clu = clu;
-
-   /* byte offset in cluster */
-   offset = (s32)(fid->rwoffset & (p_fs->cluster_size - 1));
-
-   /* sector offset in cluster */
-   sec_offset = offset >> p_bd->sector_size_bits;
-
-   /* byte offset in sector */
-   offset &= p_bd->sector_size_mask;
-
-   LogSector = START_SECTOR(clu) + sec_offset;
-
-   oneblkread = (u64)(p_bd->sector_size - offset);
-   if (oneblkread > count)
-   oneblkread = count;
-
-   if ((offset == 0) && (oneblkread == p_bd->sector_size)) {
-   if (sector_read(sb, LogSector, &tmp_bh, 1) !=
-   0)
-   goto err_out;
-   memcpy((char *)buffer + read_bytes,
-  (char *)tmp_bh->b_data, (s32)oneblkread);
-   } else {
-   if (sector_read(sb, LogSector, &tmp_bh, 1) !=
-   0)
-   goto err_out;
-   memcpy((char *)buffer + read_bytes,
-  (char *)tmp_bh->b_data + offset,
-  (s32)oneblkread);
-   }
-   count -= oneblkread;
-   read_bytes += oneblkread;
-   fid->rwoffset += oneblkrea