Re: [PATCH v5 2/8] arm64: hyperv: Add hypercall and register access functions

2019-11-03 Thread Boqun Feng
Hi Michael,

On Thu, Oct 03, 2019 at 07:03:19PM +, Michael Kelley wrote:
> Add ARM64-specific code to make Hyper-V hypercalls and to
> access virtual processor synthetic registers via hypercalls.
> Hypercalls use a Hyper-V specific calling sequence with a non-zero
> immediate value per Section 2.9 of the SMC Calling Convention
> spec.
> 
> This code is architecture dependent and is mostly driven by
> architecture independent code in the VMbus driver and the
> Hyper-V timer clocksource driver.
> 
> This code is built only when CONFIG_HYPERV is enabled.
> 
> Signed-off-by: Michael Kelley 
> ---
>  MAINTAINERS |   1 +
>  arch/arm64/Kbuild   |   1 +
>  arch/arm64/hyperv/Makefile  |   2 +
>  arch/arm64/hyperv/hv_hvc.S  |  44 +++
>  arch/arm64/hyperv/hv_init.c | 133 
> 
>  5 files changed, 181 insertions(+)
>  create mode 100644 arch/arm64/hyperv/Makefile
>  create mode 100644 arch/arm64/hyperv/hv_hvc.S
>  create mode 100644 arch/arm64/hyperv/hv_init.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d464067..84f76f9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7566,6 +7566,7 @@ F:  arch/x86/kernel/cpu/mshyperv.c
>  F:   arch/x86/hyperv
>  F:   arch/arm64/include/asm/hyperv-tlfs.h
>  F:   arch/arm64/include/asm/mshyperv.h
> +F:   arch/arm64/hyperv
>  F:   drivers/clocksource/hyperv_timer.c
>  F:   drivers/hid/hid-hyperv.c
>  F:   drivers/hv/
> diff --git a/arch/arm64/Kbuild b/arch/arm64/Kbuild
> index d646582..2469421 100644
> --- a/arch/arm64/Kbuild
> +++ b/arch/arm64/Kbuild
> @@ -3,4 +3,5 @@ obj-y += kernel/ mm/
>  obj-$(CONFIG_NET)+= net/
>  obj-$(CONFIG_KVM)+= kvm/
>  obj-$(CONFIG_XEN)+= xen/
> +obj-$(CONFIG_HYPERV) += hyperv/

I did a kernel built with CONFIG_HYPERV=m today, and found out this line
should be (similar to x86):

+obj-$(subst m,y,$(CONFIG_HYPERV))  += hyperv/

, otherwise, when CONFIG_HYPERV=m, files in arch/arm64/hyperv/ will be
compiled as obj-m, and symbols defined in those files cannot be
used by kernel builtin, e.g. hyperv_timer (since CONFIG_HYPERV_TIMER=y
in this case).

A compile/link error I hit today is:

| /home/boqun/linux-arm64/drivers/clocksource/hyperv_timer.c:98: undefined 
reference to `hv_set_vpreg'
| aarch64-linux-gnu-ld: 
/home/boqun/linux-arm64/drivers/clocksource/hyperv_timer.c:98: undefined 
reference to `hv_set_vpreg'

[...]

Besides, another problem I hit when compiled with CONFIG_HYPERV=m is:

| ERROR: "screen_info" [drivers/hv/hv_vmbus.ko] undefined!

, which can be fixed by the following change.

Regards,
Boqun

>8
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index d0cf596db82c..8ff557ae5cc6 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c

@@ -55,6 +55,7 @@ static __init pteval_t 
create_mapping_protection(efi_memory_desc_t *md)

 /* we will fill this structure from the stub, so don't put it in .bss */
 struct screen_info screen_info __section(.data);
+EXPORT_SYMBOL(screen_info);

 int __init efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md)
 {
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 10/10] errno.h: Provide EFSCORRUPTED for everybody

2019-11-03 Thread Gao Xiang
On Sun, Nov 03, 2019 at 08:45:06PM -0500, Valdis Kletnieks wrote:
> There's currently 6 filesystems that have the same #define. Move it
> into errno.h so it's defined in just one place.
> 
> Signed-off-by: Valdis Kletnieks 
> Acked-by: Darrick J. Wong 
> Reviewed-by: Jan Kara 
> Acked-by: Theodore Ts'o 

For EROFS part,

Acked-by: Gao Xiang 

> ---
>  drivers/staging/exfat/exfat.h| 2 --
>  fs/erofs/internal.h  | 2 --
>  fs/ext4/ext4.h   | 1 -
>  fs/f2fs/f2fs.h   | 1 -
>  fs/xfs/xfs_linux.h   | 1 -
>  include/linux/jbd2.h | 1 -
>  include/uapi/asm-generic/errno.h | 1 +
>  7 files changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
> index 72cf40e123de..58b091a077e8 100644
> --- a/drivers/staging/exfat/exfat.h
> +++ b/drivers/staging/exfat/exfat.h
> @@ -30,8 +30,6 @@
>  #undef DEBUG
>  #endif
>  
> -#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
> -
>  #define DENTRY_SIZE  32  /* dir entry size */
>  #define DENTRY_SIZE_BITS 5
>  
> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
> index 544a453f3076..3980026a8882 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -425,7 +425,5 @@ static inline int z_erofs_init_zip_subsystem(void) { 
> return 0; }
>  static inline void z_erofs_exit_zip_subsystem(void) {}
>  #endif   /* !CONFIG_EROFS_FS_ZIP */
>  
> -#define EFSCORRUPTEDEUCLEAN /* Filesystem is corrupted */
> -
>  #endif   /* __EROFS_INTERNAL_H */
>  
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 03db3e71676c..a86c2585457d 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -3396,6 +3396,5 @@ static inline int ext4_buffer_uptodate(struct 
> buffer_head *bh)
>  #endif   /* __KERNEL__ */
>  
>  #define EFSBADCRCEBADMSG /* Bad CRC detected */
> -#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
>  
>  #endif   /* _EXT4_H */
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 4024790028aa..04ebe77569a3 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -3752,6 +3752,5 @@ static inline bool is_journalled_quota(struct 
> f2fs_sb_info *sbi)
>  }
>  
>  #define EFSBADCRCEBADMSG /* Bad CRC detected */
> -#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
>  
>  #endif /* _LINUX_F2FS_H */
> diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
> index ca15105681ca..3409d02a7d21 100644
> --- a/fs/xfs/xfs_linux.h
> +++ b/fs/xfs/xfs_linux.h
> @@ -123,7 +123,6 @@ typedef __u32 xfs_nlink_t;
>  
>  #define ENOATTR  ENODATA /* Attribute not found */
>  #define EWRONGFS EINVAL  /* Mount with wrong filesystem type */
> -#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
>  #define EFSBADCRCEBADMSG /* Bad CRC detected */
>  
>  #define SYNCHRONIZE()barrier()
> diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
> index 603fbc4e2f70..69411d7e0431 100644
> --- a/include/linux/jbd2.h
> +++ b/include/linux/jbd2.h
> @@ -1657,6 +1657,5 @@ static inline tid_t  
> jbd2_get_latest_transaction(journal_t *journal)
>  #endif   /* __KERNEL__ */
>  
>  #define EFSBADCRCEBADMSG /* Bad CRC detected */
> -#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
>  
>  #endif   /* _LINUX_JBD2_H */
> diff --git a/include/uapi/asm-generic/errno.h 
> b/include/uapi/asm-generic/errno.h
> index cf9c51ac49f9..1d5ffdf54cb0 100644
> --- a/include/uapi/asm-generic/errno.h
> +++ b/include/uapi/asm-generic/errno.h
> @@ -98,6 +98,7 @@
>  #define  EINPROGRESS 115 /* Operation now in progress */
>  #define  ESTALE  116 /* Stale file handle */
>  #define  EUCLEAN 117 /* Structure needs cleaning */
> +#define  EFSCORRUPTEDEUCLEAN

BTW, minor, how about adding some comments right after EFSCORRUPTED
like the other error codes although it's now an alias...
Just my personal thought.

Thanks,
Gao Xiang

>  #define  ENOTNAM 118 /* Not a XENIX named type file */
>  #define  ENAVAIL 119 /* No XENIX semaphores available */
>  #define  EISNAM  120 /* Is a named type file */
> -- 
> 2.24.0.rc1
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 09/10] staging: exfat: Correct return code

2019-11-03 Thread Valdis Kletnieks
Use -ENOTEMPTY rather than -EEXIST for attempting to remove
a directory that still has files in it.

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat_super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index a97a61a60517..e2254d45ef6e 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -2167,7 +2167,7 @@ static int ffsRemoveDir(struct inode *inode, struct 
file_id_t *fid)
clu_to_free.flags = fid->flags;
 
if (!is_dir_empty(sb, _to_free)) {
-   ret = -EEXIST;
+   ret = -ENOTEMPTY;
goto out;
}
 
-- 
2.24.0.rc1

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


[PATCH v2 05/10] staging: exfat: Clean up return codes - FFS_ERROR

2019-11-03 Thread Valdis Kletnieks
Convert FFS_ERROR to -EINVAL

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h   |  1 -
 drivers/staging/exfat/exfat_core.c  | 10 +-
 drivers/staging/exfat/exfat_super.c | 20 ++--
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 7a817405c624..443fafe1d89d 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -216,7 +216,6 @@ static inline u16 get_row_index(u16 i)
 #define FFS_SEMAPHOREERR6
 #define FFS_NOTOPENED   12
 #define FFS_MAXOPENED   13
-#define FFS_ERROR   19
 
 #define NUM_UPCASE  2918
 
diff --git a/drivers/staging/exfat/exfat_core.c 
b/drivers/staging/exfat/exfat_core.c
index 2f6e9d724625..ffcad6867ecb 100644
--- a/drivers/staging/exfat/exfat_core.c
+++ b/drivers/staging/exfat/exfat_core.c
@@ -699,7 +699,7 @@ void sync_alloc_bitmap(struct super_block *sb)
 static s32 __load_upcase_table(struct super_block *sb, sector_t sector,
   u32 num_sectors, u32 utbl_checksum)
 {
-   int i, ret = FFS_ERROR;
+   int i, ret = -EINVAL;
u32 j;
struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
@@ -774,7 +774,7 @@ static s32 __load_upcase_table(struct super_block *sb, 
sector_t sector,
brelse(tmp_bh);
return FFS_SUCCESS;
}
-   ret = FFS_ERROR;
+   ret = -EINVAL;
 error:
if (tmp_bh)
brelse(tmp_bh);
@@ -784,7 +784,7 @@ static s32 __load_upcase_table(struct super_block *sb, 
sector_t sector,
 
 static s32 __load_default_upcase_table(struct super_block *sb)
 {
-   int i, ret = FFS_ERROR;
+   int i, ret = -EINVAL;
u32 j;
struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
 
@@ -1906,7 +1906,7 @@ static s32 __write_partial_entries_in_entry_set(struct 
super_block *sb,
return FFS_SUCCESS;
 err_out:
pr_debug("%s failed\n", __func__);
-   return FFS_ERROR;
+   return -EINVAL;
 }
 
 /* write back all entries in entry set */
@@ -1931,7 +1931,7 @@ s32 write_partial_entries_in_entry_set(struct super_block 
*sb,
 
/* vaidity check */
if (ep + count  > ((struct dentry_t *)>__buf) + es->num_entries)
-   return FFS_ERROR;
+   return -EINVAL;
 
dir.dir = GET_CLUSTER_FROM_SECTOR(es->sector);
dir.flags = es->alloc_flag;
diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index dd6530aef63a..daded767182a 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -498,7 +498,7 @@ static int ffsGetVolInfo(struct super_block *sb, struct 
vol_info_t *info)
 
/* check the validity of pointer parameters */
if (!info)
-   return FFS_ERROR;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -561,7 +561,7 @@ static int ffsLookupFile(struct inode *inode, char *path, 
struct file_id_t *fid)
 
/* check the validity of pointer parameters */
if (!fid || !path || (*path == '\0'))
-   return FFS_ERROR;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -654,7 +654,7 @@ static int ffsCreateFile(struct inode *inode, char *path, 
u8 mode,
 
/* check the validity of pointer parameters */
if (!fid || !path || (*path == '\0'))
-   return FFS_ERROR;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -703,7 +703,7 @@ static int ffsReadFile(struct inode *inode, struct 
file_id_t *fid, void *buffer,
 
/* check the validity of pointer parameters */
if (!buffer)
-   return FFS_ERROR;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -835,7 +835,7 @@ static int ffsWriteFile(struct inode *inode, struct 
file_id_t *fid,
 
/* check the validity of pointer parameters */
if (!buffer)
-   return FFS_ERROR;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -1241,7 +1241,7 @@ static int ffsMoveFile(struct inode *old_parent_inode, 
struct file_id_t *fid,
 
/* check the validity of pointer parameters */
if (!new_path || (*new_path == '\0'))
-   return FFS_ERROR;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -1464,7 +1464,7 @@ static int ffsSetAttr(struct inode *inode, u32 attr)
if (p_fs->dev_ejected)

[PATCH v2 07/10] staging: exfat: Clean up return codes - FFS_SUCCESS

2019-11-03 Thread Valdis Kletnieks
Convert FFS_SUCCESS to 0.

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h   |   3 -
 drivers/staging/exfat/exfat_cache.c |   4 +-
 drivers/staging/exfat/exfat_core.c  | 104 ++--
 drivers/staging/exfat/exfat_super.c |  50 ++---
 4 files changed, 79 insertions(+), 82 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index b3fc9bb06c24..72cf40e123de 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -208,9 +208,6 @@ static inline u16 get_row_index(u16 i)
 #define FM_REGULAR  0x00
 #define FM_SYMLINK  0x40
 
-/* return values */
-#define FFS_SUCCESS 0
-
 #define NUM_UPCASE  2918
 
 #define DOS_CUR_DIR_NAME".  "
diff --git a/drivers/staging/exfat/exfat_cache.c 
b/drivers/staging/exfat/exfat_cache.c
index 467b93630d86..28a67f8139ea 100644
--- a/drivers/staging/exfat/exfat_cache.c
+++ b/drivers/staging/exfat/exfat_cache.c
@@ -462,7 +462,7 @@ u8 *FAT_getblk(struct super_block *sb, sector_t sec)
 
FAT_cache_insert_hash(sb, bp);
 
-   if (sector_read(sb, sec, >buf_bh, 1) != FFS_SUCCESS) {
+   if (sector_read(sb, sec, >buf_bh, 1) != 0) {
FAT_cache_remove_hash(bp);
bp->drv = -1;
bp->sec = ~0;
@@ -582,7 +582,7 @@ static u8 *__buf_getblk(struct super_block *sb, sector_t 
sec)
 
buf_cache_insert_hash(sb, bp);
 
-   if (sector_read(sb, sec, >buf_bh, 1) != FFS_SUCCESS) {
+   if (sector_read(sb, sec, >buf_bh, 1) != 0) {
buf_cache_remove_hash(bp);
bp->drv = -1;
bp->sec = ~0;
diff --git a/drivers/staging/exfat/exfat_core.c 
b/drivers/staging/exfat/exfat_core.c
index ffcad6867ecb..1f0ef94bdd47 100644
--- a/drivers/staging/exfat/exfat_core.c
+++ b/drivers/staging/exfat/exfat_core.c
@@ -102,7 +102,7 @@ void fs_set_vol_flags(struct super_block *sb, u32 new_flag)
if (p_fs->vol_type == EXFAT) {
if (!p_fs->pbr_bh) {
if (sector_read(sb, p_fs->PBR_sector,
-   _fs->pbr_bh, 1) != FFS_SUCCESS)
+   _fs->pbr_bh, 1) != 0)
return;
}
 
@@ -139,7 +139,7 @@ void fs_error(struct super_block *sb)
 s32 clear_cluster(struct super_block *sb, u32 clu)
 {
sector_t s, n;
-   s32 ret = FFS_SUCCESS;
+   s32 ret = 0;
struct buffer_head *tmp_bh = NULL;
struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
@@ -154,12 +154,12 @@ s32 clear_cluster(struct super_block *sb, u32 clu)
 
for (; s < n; s++) {
ret = sector_read(sb, s, _bh, 0);
-   if (ret != FFS_SUCCESS)
+   if (ret != 0)
return ret;
 
memset((char *)tmp_bh->b_data, 0x0, p_bd->sector_size);
ret = sector_write(sb, s, tmp_bh, 0);
-   if (ret != FFS_SUCCESS)
+   if (ret != 0)
break;
}
 
@@ -251,7 +251,7 @@ s32 exfat_alloc_cluster(struct super_block *sb, s32 
num_alloc,
}
}
 
-   if (set_alloc_bitmap(sb, new_clu - 2) != FFS_SUCCESS)
+   if (set_alloc_bitmap(sb, new_clu - 2) != 0)
return -EIO;
 
num_clusters++;
@@ -370,7 +370,7 @@ void exfat_free_cluster(struct super_block *sb, struct 
chain_t *p_chain,
buf_release(sb, sector + i);
}
 
-   if (clr_alloc_bitmap(sb, clu - 2) != FFS_SUCCESS)
+   if (clr_alloc_bitmap(sb, clu - 2) != 0)
break;
clu++;
 
@@ -387,7 +387,7 @@ void exfat_free_cluster(struct super_block *sb, struct 
chain_t *p_chain,
buf_release(sb, sector + i);
}
 
-   if (clr_alloc_bitmap(sb, clu - 2) != FFS_SUCCESS)
+   if (clr_alloc_bitmap(sb, clu - 2) != 0)
break;
 
if (FAT_read(sb, clu, ) == -1)
@@ -552,7 +552,7 @@ s32 load_alloc_bitmap(struct super_block *sb)
for (j = 0; j < p_fs->map_sectors; j++) {
p_fs->vol_amap[j] = NULL;
ret = sector_read(sb, sector + j, 
_fs->vol_amap[j], 1);
-   if (ret != FFS_SUCCESS) {
+   if (ret != 0) {
/*  release all buffers and 
free vol_amap */
i = 0;
while (i < j)
@@ -565,7 +565,7 @@ s32 

[PATCH v2 06/10] staging: exfat: Clean up return codes - remove unused codes

2019-11-03 Thread Valdis Kletnieks
There are 6 FFS_* error values not used at all. Remove them.

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 443fafe1d89d..b3fc9bb06c24 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -210,12 +210,6 @@ static inline u16 get_row_index(u16 i)
 
 /* return values */
 #define FFS_SUCCESS 0
-#define FFS_MOUNTED 3
-#define FFS_NOTMOUNTED  4
-#define FFS_ALIGNMENTERR5
-#define FFS_SEMAPHOREERR6
-#define FFS_NOTOPENED   12
-#define FFS_MAXOPENED   13
 
 #define NUM_UPCASE  2918
 
-- 
2.24.0.rc1

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


[PATCH 10/10] errno.h: Provide EFSCORRUPTED for everybody

2019-11-03 Thread Valdis Kletnieks
There's currently 6 filesystems that have the same #define. Move it
into errno.h so it's defined in just one place.

Signed-off-by: Valdis Kletnieks 
Acked-by: Darrick J. Wong 
Reviewed-by: Jan Kara 
Acked-by: Theodore Ts'o 
---
 drivers/staging/exfat/exfat.h| 2 --
 fs/erofs/internal.h  | 2 --
 fs/ext4/ext4.h   | 1 -
 fs/f2fs/f2fs.h   | 1 -
 fs/xfs/xfs_linux.h   | 1 -
 include/linux/jbd2.h | 1 -
 include/uapi/asm-generic/errno.h | 1 +
 7 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 72cf40e123de..58b091a077e8 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -30,8 +30,6 @@
 #undef DEBUG
 #endif
 
-#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
-
 #define DENTRY_SIZE32  /* dir entry size */
 #define DENTRY_SIZE_BITS   5
 
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 544a453f3076..3980026a8882 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -425,7 +425,5 @@ static inline int z_erofs_init_zip_subsystem(void) { return 
0; }
 static inline void z_erofs_exit_zip_subsystem(void) {}
 #endif /* !CONFIG_EROFS_FS_ZIP */
 
-#define EFSCORRUPTEDEUCLEAN /* Filesystem is corrupted */
-
 #endif /* __EROFS_INTERNAL_H */
 
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 03db3e71676c..a86c2585457d 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3396,6 +3396,5 @@ static inline int ext4_buffer_uptodate(struct buffer_head 
*bh)
 #endif /* __KERNEL__ */
 
 #define EFSBADCRC  EBADMSG /* Bad CRC detected */
-#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
 
 #endif /* _EXT4_H */
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 4024790028aa..04ebe77569a3 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3752,6 +3752,5 @@ static inline bool is_journalled_quota(struct 
f2fs_sb_info *sbi)
 }
 
 #define EFSBADCRC  EBADMSG /* Bad CRC detected */
-#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
 
 #endif /* _LINUX_F2FS_H */
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index ca15105681ca..3409d02a7d21 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -123,7 +123,6 @@ typedef __u32   xfs_nlink_t;
 
 #define ENOATTRENODATA /* Attribute not found */
 #define EWRONGFS   EINVAL  /* Mount with wrong filesystem type */
-#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
 #define EFSBADCRC  EBADMSG /* Bad CRC detected */
 
 #define SYNCHRONIZE()  barrier()
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 603fbc4e2f70..69411d7e0431 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1657,6 +1657,5 @@ static inline tid_t  
jbd2_get_latest_transaction(journal_t *journal)
 #endif /* __KERNEL__ */
 
 #define EFSBADCRC  EBADMSG /* Bad CRC detected */
-#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
 
 #endif /* _LINUX_JBD2_H */
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
index cf9c51ac49f9..1d5ffdf54cb0 100644
--- a/include/uapi/asm-generic/errno.h
+++ b/include/uapi/asm-generic/errno.h
@@ -98,6 +98,7 @@
 #defineEINPROGRESS 115 /* Operation now in progress */
 #defineESTALE  116 /* Stale file handle */
 #defineEUCLEAN 117 /* Structure needs cleaning */
+#defineEFSCORRUPTEDEUCLEAN
 #defineENOTNAM 118 /* Not a XENIX named type file */
 #defineENAVAIL 119 /* No XENIX semaphores available */
 #defineEISNAM  120 /* Is a named type file */
-- 
2.24.0.rc1

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


[PATCH v2 08/10] staging: exfat: Collapse redundant return code translations

2019-11-03 Thread Valdis Kletnieks
Now that we no longer use odd internal return codes, we can
heave the translation code over the side, and just pass the
error code back up the call chain.

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat_super.c | 92 +
 1 file changed, 14 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index 5d538593b5f6..a97a61a60517 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -650,7 +650,7 @@ static int ffsCreateFile(struct inode *inode, char *path, 
u8 mode,
struct uni_name_t uni_name;
struct super_block *sb = inode->i_sb;
struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
-   int ret;
+   int ret = 0;
 
/* check the validity of pointer parameters */
if (!fid || !path || (*path == '\0'))
@@ -2366,19 +2366,9 @@ static int exfat_create(struct inode *dir, struct dentry 
*dentry, umode_t mode,
pr_debug("%s entered\n", __func__);
 
err = ffsCreateFile(dir, (u8 *)dentry->d_name.name, FM_REGULAR, );
-   if (err) {
-   if (err == -EINVAL)
-   err = -EINVAL;
-   else if (err == -EEXIST)
-   err = -EEXIST;
-   else if (err == -ENOSPC)
-   err = -ENOSPC;
-   else if (err == -ENAMETOOLONG)
-   err = -ENAMETOOLONG;
-   else
-   err = -EIO;
+   if (err)
goto out;
-   }
+
INC_IVERSION(dir);
curtime = current_time(dir);
dir->i_ctime = curtime;
@@ -2543,13 +2533,9 @@ static int exfat_unlink(struct inode *dir, struct dentry 
*dentry)
EXFAT_I(inode)->fid.size = i_size_read(inode);
 
err = ffsRemoveFile(dir, &(EXFAT_I(inode)->fid));
-   if (err) {
-   if (err == -EPERM)
-   err = -EPERM;
-   else
-   err = -EIO;
+   if (err)
goto out;
-   }
+
INC_IVERSION(dir);
curtime = current_time(dir);
dir->i_mtime = curtime;
@@ -2589,27 +2575,14 @@ static int exfat_symlink(struct inode *dir, struct 
dentry *dentry,
pr_debug("%s entered\n", __func__);
 
err = ffsCreateFile(dir, (u8 *)dentry->d_name.name, FM_SYMLINK, );
-   if (err) {
-   if (err == -EINVAL)
-   err = -EINVAL;
-   else if (err == -EEXIST)
-   err = -EEXIST;
-   else if (err == -ENOSPC)
-   err = -ENOSPC;
-   else
-   err = -EIO;
+   if (err)
goto out;
-   }
+
 
err = ffsWriteFile(dir, , (char *)target, len, );
 
if (err) {
ffsRemoveFile(dir, );
-
-   if (err == -ENOSPC)
-   err = -ENOSPC;
-   else
-   err = -EIO;
goto out;
}
 
@@ -2666,19 +2639,9 @@ static int exfat_mkdir(struct inode *dir, struct dentry 
*dentry, umode_t mode)
pr_debug("%s entered\n", __func__);
 
err = ffsCreateDir(dir, (u8 *)dentry->d_name.name, );
-   if (err) {
-   if (err == -EINVAL)
-   err = -EINVAL;
-   else if (err == -EEXIST)
-   err = -EEXIST;
-   else if (err == -ENOSPC)
-   err = -ENOSPC;
-   else if (err == -ENAMETOOLONG)
-   err = -ENAMETOOLONG;
-   else
-   err = -EIO;
+   if (err)
goto out;
-   }
+
INC_IVERSION(dir);
curtime = current_time(dir);
dir->i_ctime = curtime;
@@ -2727,19 +2690,9 @@ static int exfat_rmdir(struct inode *dir, struct dentry 
*dentry)
EXFAT_I(inode)->fid.size = i_size_read(inode);
 
err = ffsRemoveDir(dir, &(EXFAT_I(inode)->fid));
-   if (err) {
-   if (err == -EINVAL)
-   err = -EINVAL;
-   else if (err == -EEXIST)
-   err = -ENOTEMPTY;
-   else if (err == -ENOENT)
-   err = -ENOENT;
-   else if (err == -EBUSY)
-   err = -EBUSY;
-   else
-   err = -EIO;
+   if (err)
goto out;
-   }
+
INC_IVERSION(dir);
curtime = current_time(dir);
dir->i_mtime = curtime;
@@ -2787,21 +2740,9 @@ static int exfat_rename(struct inode *old_dir, struct 
dentry *old_dentry,
 
err = ffsMoveFile(old_dir, &(EXFAT_I(old_inode)->fid), new_dir,
  new_dentry);
-   if (err) {
-   if (err == -EPERM)
-   err = -EPERM;
-   else if (err == -EINVAL)
-   err = -EINVAL;
-   else if (err == -EEXIST)
-  

[PATCH v2 04/10] staging: exfat: Clean up return codes - FFS_INVALIDFID

2019-11-03 Thread Valdis Kletnieks
Covert FFS_INVALIDFID to -EINVAL

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h   |  1 -
 drivers/staging/exfat/exfat_super.c | 10 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 292af85e3cd2..7a817405c624 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -214,7 +214,6 @@ static inline u16 get_row_index(u16 i)
 #define FFS_NOTMOUNTED  4
 #define FFS_ALIGNMENTERR5
 #define FFS_SEMAPHOREERR6
-#define FFS_INVALIDFID  8
 #define FFS_NOTOPENED   12
 #define FFS_MAXOPENED   13
 #define FFS_ERROR   19
diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index 7c99d1f8cba8..dd6530aef63a 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -699,7 +699,7 @@ static int ffsReadFile(struct inode *inode, struct 
file_id_t *fid, void *buffer,
 
/* check the validity of the given file id */
if (!fid)
-   return FFS_INVALIDFID;
+   return -EINVAL;
 
/* check the validity of pointer parameters */
if (!buffer)
@@ -831,7 +831,7 @@ static int ffsWriteFile(struct inode *inode, struct 
file_id_t *fid,
 
/* check the validity of the given file id */
if (!fid)
-   return FFS_INVALIDFID;
+   return -EINVAL;
 
/* check the validity of pointer parameters */
if (!buffer)
@@ -1237,7 +1237,7 @@ static int ffsMoveFile(struct inode *old_parent_inode, 
struct file_id_t *fid,
 
/* check the validity of the given file id */
if (!fid)
-   return FFS_INVALIDFID;
+   return -EINVAL;
 
/* check the validity of pointer parameters */
if (!new_path || (*new_path == '\0'))
@@ -1358,7 +1358,7 @@ static int ffsRemoveFile(struct inode *inode, struct 
file_id_t *fid)
 
/* check the validity of the given file id */
if (!fid)
-   return FFS_INVALIDFID;
+   return -EINVAL;
 
/* acquire the lock for file system critical section */
mutex_lock(_fs->v_mutex);
@@ -2145,7 +2145,7 @@ static int ffsRemoveDir(struct inode *inode, struct 
file_id_t *fid)
 
/* check the validity of the given file id */
if (!fid)
-   return FFS_INVALIDFID;
+   return -EINVAL;
 
dir.dir = fid->dir.dir;
dir.size = fid->dir.size;
-- 
2.24.0.rc1

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


[PATCH v2 03/10] staging: exfat: Clean up return codes - FFS_EOF

2019-11-03 Thread Valdis Kletnieks
Convert FFS_EOF to return 0 for a zero-length read() as per 'man 2 read'.

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h   | 1 -
 drivers/staging/exfat/exfat_super.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 286605262345..292af85e3cd2 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -217,7 +217,6 @@ static inline u16 get_row_index(u16 i)
 #define FFS_INVALIDFID  8
 #define FFS_NOTOPENED   12
 #define FFS_MAXOPENED   13
-#define FFS_EOF 15
 #define FFS_ERROR   19
 
 #define NUM_UPCASE  2918
diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index d6d5f0fd47fd..7c99d1f8cba8 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -723,7 +723,7 @@ static int ffsReadFile(struct inode *inode, struct 
file_id_t *fid, void *buffer,
if (count == 0) {
if (rcount)
*rcount = 0;
-   ret = FFS_EOF;
+   ret = 0;
goto out;
}
 
-- 
2.24.0.rc1

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


[PATCH v2 02/10] staging: exfat: Clean up return codes - FFS_MEDIAERR

2019-11-03 Thread Valdis Kletnieks
Convert FFS_MEDIAERR to (mostly) -ENOENT and -EIO.  Some additional code surgery
needed to propogate correct error codes upwards.

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h|   1 -
 drivers/staging/exfat/exfat_blkdev.c |  18 ++---
 drivers/staging/exfat/exfat_core.c   |  80 +-
 drivers/staging/exfat/exfat_super.c  | 117 ++-
 4 files changed, 108 insertions(+), 108 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 4f9ba235d967..286605262345 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -210,7 +210,6 @@ static inline u16 get_row_index(u16 i)
 
 /* return values */
 #define FFS_SUCCESS 0
-#define FFS_MEDIAERR1
 #define FFS_MOUNTED 3
 #define FFS_NOTMOUNTED  4
 #define FFS_ALIGNMENTERR5
diff --git a/drivers/staging/exfat/exfat_blkdev.c 
b/drivers/staging/exfat/exfat_blkdev.c
index 81d20e6241c6..0abae041f632 100644
--- a/drivers/staging/exfat/exfat_blkdev.c
+++ b/drivers/staging/exfat/exfat_blkdev.c
@@ -40,11 +40,11 @@ int bdev_read(struct super_block *sb, sector_t secno, 
struct buffer_head **bh,
long flags = sbi->debug_flags;
 
if (flags & EXFAT_DEBUGFLAGS_ERROR_RW)
-   return FFS_MEDIAERR;
+   return -EIO;
 #endif /* CONFIG_EXFAT_KERNEL_DEBUG */
 
if (!p_bd->opened)
-   return FFS_MEDIAERR;
+   return -ENODEV;
 
if (*bh)
__brelse(*bh);
@@ -62,7 +62,7 @@ int bdev_read(struct super_block *sb, sector_t secno, struct 
buffer_head **bh,
WARN(!p_fs->dev_ejected,
 "[EXFAT] No bh, device seems wrong or to be ejected.\n");
 
-   return FFS_MEDIAERR;
+   return -EIO;
 }
 
 int bdev_write(struct super_block *sb, sector_t secno, struct buffer_head *bh,
@@ -77,11 +77,11 @@ int bdev_write(struct super_block *sb, sector_t secno, 
struct buffer_head *bh,
long flags = sbi->debug_flags;
 
if (flags & EXFAT_DEBUGFLAGS_ERROR_RW)
-   return FFS_MEDIAERR;
+   return -EIO;
 #endif /* CONFIG_EXFAT_KERNEL_DEBUG */
 
if (!p_bd->opened)
-   return FFS_MEDIAERR;
+   return -ENODEV;
 
if (secno == bh->b_blocknr) {
lock_buffer(bh);
@@ -89,7 +89,7 @@ int bdev_write(struct super_block *sb, sector_t secno, struct 
buffer_head *bh,
mark_buffer_dirty(bh);
unlock_buffer(bh);
if (sync && (sync_dirty_buffer(bh) != 0))
-   return FFS_MEDIAERR;
+   return -EIO;
} else {
count = num_secs << p_bd->sector_size_bits;
 
@@ -115,7 +115,7 @@ int bdev_write(struct super_block *sb, sector_t secno, 
struct buffer_head *bh,
WARN(!p_fs->dev_ejected,
 "[EXFAT] No bh, device seems wrong or to be ejected.\n");
 
-   return FFS_MEDIAERR;
+   return -EIO;
 }
 
 int bdev_sync(struct super_block *sb)
@@ -126,11 +126,11 @@ int bdev_sync(struct super_block *sb)
long flags = sbi->debug_flags;
 
if (flags & EXFAT_DEBUGFLAGS_ERROR_RW)
-   return FFS_MEDIAERR;
+   return -EIO;
 #endif /* CONFIG_EXFAT_KERNEL_DEBUG */
 
if (!p_bd->opened)
-   return FFS_MEDIAERR;
+   return -ENODEV;
 
return sync_blockdev(sb->s_bdev);
 }
diff --git a/drivers/staging/exfat/exfat_core.c 
b/drivers/staging/exfat/exfat_core.c
index e90b54a17150..2f6e9d724625 100644
--- a/drivers/staging/exfat/exfat_core.c
+++ b/drivers/staging/exfat/exfat_core.c
@@ -252,13 +252,13 @@ s32 exfat_alloc_cluster(struct super_block *sb, s32 
num_alloc,
}
 
if (set_alloc_bitmap(sb, new_clu - 2) != FFS_SUCCESS)
-   return -1;
+   return -EIO;
 
num_clusters++;
 
if (p_chain->flags == 0x01) {
if (FAT_write(sb, new_clu, CLUSTER_32(~0)) < 0)
-   return -1;
+   return -EIO;
}
 
if (p_chain->dir == CLUSTER_32(~0)) {
@@ -266,7 +266,7 @@ s32 exfat_alloc_cluster(struct super_block *sb, s32 
num_alloc,
} else {
if (p_chain->flags == 0x01) {
if (FAT_write(sb, last_clu, new_clu) < 0)
-   return -1;
+   return -EIO;
}
}
last_clu = new_clu;
@@ -526,7 +526,7 @@ s32 load_alloc_bitmap(struct super_block *sb)
ep = (struct bmap_dentry_t *)get_entry_in_dir(sb, ,
  i, NULL);
if (!ep)
-   return FFS_MEDIAERR;
+   return -ENOENT;

[PATCH v2 01/10] staging: exfat: Clean up return codes - FFS_FORMATERR

2019-11-03 Thread Valdis Kletnieks
Convert FFS_FORMATERR to -EFSCORRUPTED

Signed-off-by: Valdis Kletnieks 
---
 drivers/staging/exfat/exfat.h  | 3 ++-
 drivers/staging/exfat/exfat_core.c | 8 
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index acb73f47a253..4f9ba235d967 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -30,6 +30,8 @@
 #undef DEBUG
 #endif
 
+#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
+
 #define DENTRY_SIZE32  /* dir entry size */
 #define DENTRY_SIZE_BITS   5
 
@@ -209,7 +211,6 @@ static inline u16 get_row_index(u16 i)
 /* return values */
 #define FFS_SUCCESS 0
 #define FFS_MEDIAERR1
-#define FFS_FORMATERR   2
 #define FFS_MOUNTED 3
 #define FFS_NOTMOUNTED  4
 #define FFS_ALIGNMENTERR5
diff --git a/drivers/staging/exfat/exfat_core.c 
b/drivers/staging/exfat/exfat_core.c
index b23fbf3ebaa5..e90b54a17150 100644
--- a/drivers/staging/exfat/exfat_core.c
+++ b/drivers/staging/exfat/exfat_core.c
@@ -573,7 +573,7 @@ s32 load_alloc_bitmap(struct super_block *sb)
return FFS_MEDIAERR;
}
 
-   return FFS_FORMATERR;
+   return -EFSCORRUPTED;
 }
 
 void free_alloc_bitmap(struct super_block *sb)
@@ -3016,7 +3016,7 @@ s32 fat16_mount(struct super_block *sb, struct 
pbr_sector_t *p_pbr)
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
 
if (p_bpb->num_fats == 0)
-   return FFS_FORMATERR;
+   return -EFSCORRUPTED;
 
num_root_sectors = GET16(p_bpb->num_root_entries) << DENTRY_SIZE_BITS;
num_root_sectors = ((num_root_sectors - 1) >>
@@ -3078,7 +3078,7 @@ s32 fat32_mount(struct super_block *sb, struct 
pbr_sector_t *p_pbr)
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
 
if (p_bpb->num_fats == 0)
-   return FFS_FORMATERR;
+   return -EFSCORRUPTED;
 
p_fs->sectors_per_clu = p_bpb->sectors_per_clu;
p_fs->sectors_per_clu_bits = ilog2(p_bpb->sectors_per_clu);
@@ -3157,7 +3157,7 @@ s32 exfat_mount(struct super_block *sb, struct 
pbr_sector_t *p_pbr)
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
 
if (p_bpb->num_fats == 0)
-   return FFS_FORMATERR;
+   return -EFSCORRUPTED;
 
p_fs->sectors_per_clu = 1 << p_bpb->sectors_per_clu_bits;
p_fs->sectors_per_clu_bits = p_bpb->sectors_per_clu_bits;
-- 
2.24.0.rc1

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


[PATCH v2 00/10] staging: exfat: Clean up return codes, revisited

2019-11-03 Thread Valdis Kletnieks
The rest of the conversion from internal error numbers to the
standard values used in the rest of the kernel.

Patch 10/10 is logically separate, merging multiple #defines
into one place in errno.h.  It's included in the series because
it depends on patch 1/10.

Valdis Kletnieks (10):
  staging: exfat: Clean up return codes - FFS_FORMATERR
  staging: exfat: Clean up return codes - FFS_MEDIAERR
  staging: exfat: Clean up return codes - FFS_EOF
  staging: exfat: Clean up return codes - FFS_INVALIDFID
  staging: exfat: Clean up return codes - FFS_ERROR
  staging: exfat: Clean up return codes - remove unused codes
  staging: exfat: Clean up return codes - FFS_SUCCESS
  staging: exfat: Collapse redundant return code translations
  staging: exfat: Correct return code
  errno.h: Provide EFSCORRUPTED for everybody

 drivers/staging/exfat/exfat.h|  14 --
 drivers/staging/exfat/exfat_blkdev.c |  18 +-
 drivers/staging/exfat/exfat_cache.c  |   4 +-
 drivers/staging/exfat/exfat_core.c   | 202 +-
 drivers/staging/exfat/exfat_super.c  | 293 +++
 fs/erofs/internal.h  |   2 -
 fs/ext4/ext4.h   |   1 -
 fs/f2fs/f2fs.h   |   1 -
 fs/xfs/xfs_linux.h   |   1 -
 include/linux/jbd2.h |   1 -
 include/uapi/asm-generic/errno.h |   1 +
 11 files changed, 228 insertions(+), 310 deletions(-)

-- 
2.24.0.rc1

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


Lieber Freund (Assalamu Alaikum),

2019-11-03 Thread Aisha Gddafi
-- 
Lieber Freund (Assalamu Alaikum),

Ich bin vor einer privaten Suche auf Ihren E-Mail-Kontakt gestoßen
Ihre Hilfe. Mein Name ist Aisha Al-Qaddafi, alleinerziehende Mutter und Witwe
mit drei Kindern. Ich bin die einzige biologische Tochter des späten Libyers
Präsident (Oberst Muammar Gaddafi).

Ich habe Investmentfonds im Wert von siebenundzwanzig Millionen und
fünfhunderttausend
United State Dollar (27.500.000,00 $) und ich brauche eine
vertrauenswürdige Investition
Manager / Partner wegen meines aktuellen Flüchtlingsstatus bin ich jedoch
Interesse an Ihnen für die Unterstützung von Investitionsprojekten in
Ihrem Land, kann sein
Von dort aus können wir in nächster Zukunft eine Geschäftsbeziehung aufbauen.

Ich bin gerne bereit, mit Ihnen das Verhältnis der Beteiligungsquote zu teilen
stützen Sie sich auf die zukünftigen Investitionen, die Gewinne erzielen.

Wenn Sie bereit sind, dieses Projekt in meinem Namen durchzuführen,
antworten Sie bitte dringend
Damit ich Ihnen mehr Informationen über die Investmentfonds geben kann.

Ihre dringende Antwort wird geschätzt. Schreiben Sie mir an diese
E-Mail-Adresse (
ayishagdda...@mail.com ) zur weiteren Diskussion.

Freundliche Grüße
Frau Aisha Al-Gaddafi
Antwort an: ayishagdda...@mail.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Investment opportunity

2019-11-03 Thread Peter Wong
Greetings,

Find the attached mail very confidential. reply for more details

Thanks.
Peter Wong





This email was sent by the shareware version of Postman Professional.

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


[driver-core:device_h_splitup 34/35] drivers/net//ethernet/hisilicon/hns/hns_dsaf_misc.c:762:54: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type

2019-11-03 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
device_h_splitup
head:   8ac09706c581716b3ca938773ad29e50854fa674
commit: bfe8e3fa1f0d3946158a6526aefccc5160b51cb9 [34/35] device.h: move 'struct 
bus' stuff out to device/bus.h
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout bfe8e3fa1f0d3946158a6526aefccc5160b51cb9
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:29:0,
from include/linux/dma-mapping.h:7,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from include/linux/if_vlan.h:10,
from drivers/net//ethernet/hisilicon/hns/hns_dsaf_mac.h:9,
from drivers/net//ethernet/hisilicon/hns/hns_dsaf_misc.c:6:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
inside parameter list will not be visible outside of this definition or 
declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   drivers/net//ethernet/hisilicon/hns/hns_dsaf_misc.c: In function 
'hns_dsaf_find_platform_device':
>> drivers/net//ethernet/hisilicon/hns/hns_dsaf_misc.c:762:54: error: passing 
>> argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
 dev = bus_find_device_by_fwnode(_bus_type, fwnode);
 ^~
   In file included from include/linux/device.h:29:0,
from include/linux/dma-mapping.h:7,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from include/linux/if_vlan.h:10,
from drivers/net//ethernet/hisilicon/hns/hns_dsaf_mac.h:9,
from drivers/net//ethernet/hisilicon/hns/hns_dsaf_misc.c:6:
   include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle 
*' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
^
   cc1: some warnings being treated as errors

vim +/bus_find_device_by_fwnode +762 
drivers/net//ethernet/hisilicon/hns/hns_dsaf_misc.c

d605916b765934 Salil2016-08-24  756  
d605916b765934 Salil2016-08-24  757  struct
d605916b765934 Salil2016-08-24  758  platform_device 
*hns_dsaf_find_platform_device(struct fwnode_handle *fwnode)
d605916b765934 Salil2016-08-24  759  {
d605916b765934 Salil2016-08-24  760 struct device *dev;
d605916b765934 Salil2016-08-24  761  
67843bbaf36eb0 Suzuki K Poulose 2019-07-23 @762 dev = 
bus_find_device_by_fwnode(_bus_type, fwnode);

:: The code at line 762 was first introduced by commit
:: 67843bbaf36eb087714f40e783ee78e99e9e4b86 drivers: Introduce device 
lookup variants by fwnode

:: TO: Suzuki K Poulose 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:device_h_splitup 35/35] drivers/usb/roles/class.c:97:49: error: passing argument 2 of 'class_find_device_by_fwnode' from incompatible pointer type

2019-11-03 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
device_h_splitup
head:   8ac09706c581716b3ca938773ad29e50854fa674
commit: 8ac09706c581716b3ca938773ad29e50854fa674 [35/35] device.h: move 'struct 
class' stuff out to device/class.h
config: x86_64-randconfig-b001-201944 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 8ac09706c581716b3ca938773ad29e50854fa674
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:29:0,
from include/linux/usb/role.h:6,
from drivers/usb/roles/class.c:10:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
inside parameter list will not be visible outside of this definition or 
declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   In file included from include/linux/device.h:30:0,
from include/linux/usb/role.h:6,
from drivers/usb/roles/class.c:10:
   include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' 
declared inside parameter list will not be visible outside of this definition 
or declaration
   const struct fwnode_handle *fwnode)
^
   drivers/usb/roles/class.c: In function 'usb_role_switch_match':
>> drivers/usb/roles/class.c:97:49: error: passing argument 2 of 
>> 'class_find_device_by_fwnode' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
  dev = class_find_device_by_fwnode(role_class, con->fwnode);
^~~
   In file included from include/linux/device.h:30:0,
from include/linux/usb/role.h:6,
from drivers/usb/roles/class.c:10:
   include/linux/device/class.h:151:1: note: expected 'const struct 
fwnode_handle *' but argument is of type 'struct fwnode_handle *'
class_find_device_by_fwnode(struct class *class,
^~~
   drivers/usb/roles/class.c: In function 'usb_role_switch_is_parent':
   drivers/usb/roles/class.c:114:48: error: passing argument 2 of 
'class_find_device_by_fwnode' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
 dev = class_find_device_by_fwnode(role_class, parent);
   ^~
   In file included from include/linux/device.h:30:0,
from include/linux/usb/role.h:6,
from drivers/usb/roles/class.c:10:
   include/linux/device/class.h:151:1: note: expected 'const struct 
fwnode_handle *' but argument is of type 'struct fwnode_handle *'
class_find_device_by_fwnode(struct class *class,
^~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/device.h:29:0,
from drivers/usb/typec/class.c:9:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
inside parameter list will not be visible outside of this definition or 
declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   In file included from include/linux/device.h:30:0,
from drivers/usb/typec/class.c:9:
   include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' 
declared inside parameter list will not be visible outside of this definition 
or declaration
   const struct fwnode_handle *fwnode)
^
   drivers/usb/typec/class.c: In function 'typec_port_match':
>> drivers/usb/typec/class.c:217:51: error: passing argument 2 of 
>> 'class_find_device_by_fwnode' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
  return class_find_device_by_fwnode(typec_class, con->fwnode);
  ^~~
   In file included from include/linux/device.h:30:0,
from drivers/usb/typec/class.c:9:
   include/linux/device/class.h:151:1: note: expected 'const struct 
fwnode_handle *' but argument is of type 'struct fwnode_handle *'
class_find_device_by_fwnode(struct class *class,
^~~
   cc1: some warnings being treated as errors

vim +/class_find_device_by_fwnode +97 drivers/usb/roles/class.c

fde0aa6c175a4d drivers/usb/common/roles.c Heikki Krogerus  2018-03-20  @10  
#include 
ec69e9533c4879 drivers/usb/roles/class.c  Heikki Krogerus  2019-02-13   11  
#include 
fde0aa6c175a4d drivers/usb/common/roles.c Heikki Krogerus  2018-03-20   12  
#include 
fde0aa6c175a4d drivers/usb/common/roles.c Heikki Krogerus  

Re: [PATCH] drivers/staging/exfat: Ensure we unlock upon error in ffsReadFile

2019-11-03 Thread Valdis Klētnieks
On Sun, 03 Nov 2019 10:09:21 -0800, Davidlohr Bueso said:
> The call was not releasing the mutex upon error.
>
> Reported-by: kbuild test robot 
> Reported-by: Julia Lawall 
> Signed-off-by: Davidlohr Bueso 

Yeah, I missed one, thanks for catching it.

Acked-By: Valdis Kletnieks 




pgpmwxhzgZnpU.pgp
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:device_h_splitup 34/35] drivers//base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type

2019-11-03 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
device_h_splitup
head:   8ac09706c581716b3ca938773ad29e50854fa674
commit: bfe8e3fa1f0d3946158a6526aefccc5160b51cb9 [34/35] device.h: move 'struct 
bus' stuff out to device/bus.h
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout bfe8e3fa1f0d3946158a6526aefccc5160b51cb9
# save the attached .config to linux build tree
make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:29:0,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from arch/x86//kernel/irq.c:5:
>> include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
>> inside parameter list will not be visible outside of this definition or 
>> declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
--
   In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
>> include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
>> inside parameter list will not be visible outside of this definition or 
>> declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   drivers//base/devcon.c: In function 'device_connection_fwnode_match':
>> drivers//base/devcon.c:161:40: error: passing argument 2 of 
>> 'bus_find_device_by_fwnode' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
  dev = bus_find_device_by_fwnode(bus, con->fwnode);
   ^~~
   In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
   include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle 
*' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
^
   cc1: some warnings being treated as errors

vim +/bus_find_device_by_fwnode +161 drivers//base/devcon.c

f2d9b66d84f3ff Heikki Krogerus  2018-03-20   @9  #include 
637e9e52b185e5 Heikki Krogerus  2019-02-13   10  #include 
f2d9b66d84f3ff Heikki Krogerus  2018-03-20   11  
f2d9b66d84f3ff Heikki Krogerus  2018-03-20   12  static 
DEFINE_MUTEX(devcon_lock);
f2d9b66d84f3ff Heikki Krogerus  2018-03-20   13  static LIST_HEAD(devcon_list);
f2d9b66d84f3ff Heikki Krogerus  2018-03-20   14  
637e9e52b185e5 Heikki Krogerus  2019-02-13   15  static void *
637e9e52b185e5 Heikki Krogerus  2019-02-13   16  
fwnode_graph_devcon_match(struct fwnode_handle *fwnode, const char *con_id,
637e9e52b185e5 Heikki Krogerus  2019-02-13   17   void 
*data, devcon_match_fn_t match)
637e9e52b185e5 Heikki Krogerus  2019-02-13   18  {
637e9e52b185e5 Heikki Krogerus  2019-02-13   19 struct 
device_connection con = { .id = con_id };
637e9e52b185e5 Heikki Krogerus  2019-02-13   20 struct fwnode_handle 
*ep;
637e9e52b185e5 Heikki Krogerus  2019-02-13   21 void *ret;
637e9e52b185e5 Heikki Krogerus  2019-02-13   22  
637e9e52b185e5 Heikki Krogerus  2019-02-13   23 
fwnode_graph_for_each_endpoint(fwnode, ep) {
637e9e52b185e5 Heikki Krogerus  2019-02-13   24 con.fwnode = 
fwnode_graph_get_remote_port_parent(ep);
637e9e52b185e5 Heikki Krogerus  2019-02-13   25 if 
(!fwnode_device_is_available(con.fwnode))
637e9e52b185e5 Heikki Krogerus  2019-02-13   26 
continue;
637e9e52b185e5 Heikki Krogerus  2019-02-13   27  
637e9e52b185e5 Heikki Krogerus  2019-02-13   28 ret = 
match(, -1, data);
637e9e52b185e5 Heikki Krogerus  2019-02-13   29 
fwnode_handle_put(con.fwnode);
637e9e52b185e5 Heikki Krogerus  2019-02-13   30 if (ret) {
637e9e52b185e5 Heikki Krogerus  2019-02-13   31 
fwnode_handle_put(ep);
637e9e52b185e5 Heikki Krogerus  2019-02-13   32 return 
ret;
637e9e52b185e5 Heikki Krogerus  2019-02-13   33 }
637e9e52b185e5 Heikki Krogerus  2019-02-13   34 }
637e9e52b185e5 Heikki Krogerus  2019-02-13   35 return NULL;
637e9e52b185e5 Heikki Krogerus  2019-02-13   36  }
637e9e52b185e5 Heikki Krogerus  2019-02-13   37  
fde91eb83f Heikki Krogerus  2019-05-31   38  static void *
fde91eb83f Heikki Krogerus  2019-05-31   39  fwnode_devcon_match(struct 
fwnode_handle *fwnode, const char *con_id,
fde91eb83f Heikki Krogerus  2019-05-31   40 void *data, 
devcon_match_fn_t match)
fde91eb83f Heikki Krogerus  2019-05-31   

[driver-core:device_h_splitup 35/35] include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration

2019-11-03 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
device_h_splitup
head:   8ac09706c581716b3ca938773ad29e50854fa674
commit: 8ac09706c581716b3ca938773ad29e50854fa674 [35/35] device.h: move 'struct 
class' stuff out to device/class.h
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 8ac09706c581716b3ca938773ad29e50854fa674
# save the attached .config to linux build tree
make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:29:0,
from drivers/base/component.c:11:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
inside parameter list will not be visible outside of this definition or 
declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   In file included from include/linux/device.h:30:0,
from drivers/base/component.c:11:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' 
>> declared inside parameter list will not be visible outside of this 
>> definition or declaration
   const struct fwnode_handle *fwnode)
^
--
   In file included from include/linux/device.h:29:0,
from drivers/base/devcon.c:9:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
inside parameter list will not be visible outside of this definition or 
declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   In file included from include/linux/device.h:30:0,
from drivers/base/devcon.c:9:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' 
>> declared inside parameter list will not be visible outside of this 
>> definition or declaration
   const struct fwnode_handle *fwnode)
^
   drivers/base/devcon.c: In function 'device_connection_fwnode_match':
   drivers/base/devcon.c:161:40: error: passing argument 2 of 
'bus_find_device_by_fwnode' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  dev = bus_find_device_by_fwnode(bus, con->fwnode);
   ^~~
   In file included from include/linux/device.h:29:0,
from drivers/base/devcon.c:9:
   include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle 
*' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
^
   cc1: some warnings being treated as errors
--
   In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared 
inside parameter list will not be visible outside of this definition or 
declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
 ^
   In file included from include/linux/device.h:30:0,
from drivers//base/devcon.c:9:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' 
>> declared inside parameter list will not be visible outside of this 
>> definition or declaration
   const struct fwnode_handle *fwnode)
^
   drivers//base/devcon.c: In function 'device_connection_fwnode_match':
   drivers//base/devcon.c:161:40: error: passing argument 2 of 
'bus_find_device_by_fwnode' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  dev = bus_find_device_by_fwnode(bus, con->fwnode);
   ^~~
   In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
   include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle 
*' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle 
*fwnode)
^
   cc1: some warnings being treated as errors

vim +152 include/linux/device/class.h

   143  
   144  /**
   145   * class_find_device_by_fwnode : device iterator for locating a 
particular device
   146   * matching the fwnode.
   147   * @class: class type
   148   * @fwnode: fwnode of the device to match.
   149   */
   150  static inline struct device *
   151  class_find_device_by_fwnode(struct class *class,
 > 152  const struct fwnode_handle *fwnode)
   153  {
   154  return 

[PATCH] drivers/staging/exfat: Ensure we unlock upon error in ffsReadFile

2019-11-03 Thread Davidlohr Bueso
The call was not releasing the mutex upon error.

Reported-by: kbuild test robot 
Reported-by: Julia Lawall 
Signed-off-by: Davidlohr Bueso 
---
 drivers/staging/exfat/exfat_super.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/exfat/exfat_super.c 
b/drivers/staging/exfat/exfat_super.c
index e9e9868cae85..02dcfe06fc4f 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -742,8 +742,10 @@ static int ffsReadFile(struct inode *inode, struct 
file_id_t *fid, void *buffer,
 
while (clu_offset > 0) {
/* clu = FAT_read(sb, clu); */
-   if (FAT_read(sb, clu, ) == -1)
-   return FFS_MEDIAERR;
+   if (FAT_read(sb, clu, ) == -1) {
+   ret = FFS_MEDIAERR;
+   goto out;
+   }
 
clu_offset--;
}
-- 
2.16.4

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


Re: [staging:staging-testing 275/291] drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707 (fwd)

2019-11-03 Thread Davidlohr Bueso

On Sun, 03 Nov 2019, Julia Lawall wrote:


The return at line 747 may need an unlock.


Good catch.

...


:: The code at line 747 was first introduced by commit
:: c48c9f7ff32b8b3965a08e40eb6763682d905b5d staging: exfat: add exfat 
filesystem code to staging


Indeed, this was the case regardless of the locking primitive used.

I'll send a patch shortly.

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


Re: [PATCH] FBTFT: Changed delay function.

2019-11-03 Thread Greg KH
On Sun, Nov 03, 2019 at 09:40:03AM -0600, Rama Kumar wrote:
> 
> Hi,
> 
> Changed udelay() to usleep_range() based on the document in the path, 
> "Documentation/timers/timers-howto.rst". It was suggested to use 
> usleep_range() function for sleeping duration between 10us - 20 ms. original 
> code used udelay() for sleeping 20 us.
>  
> ---
> drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c 
> b/drivers/staging/fbtft/fb_agm1264k-fl.c
> index ec97ad27..471a145e3c00 100644
> --- a/drivers/staging/fbtft/fb_agm1264k-fl.c
> +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
> @@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)
>   dev_dbg(par->info->device, "%s()\n", __func__);
>  
>   gpiod_set_value(par->gpio.reset, 0);
> - udelay(20);
> + usleep_range(20,20);
>   gpiod_set_value(par->gpio.reset, 1);
>   mdelay(120);
>  }
> -- 
> Signed-off-by: Rama Kumar 

Always run checkptch.pl on patches you send out so you don't get grumpy
maintainers telling you to run checkpatch.pl on your patch :)

thanks,

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


[PATCH] FBTFT: Changed delay function.

2019-11-03 Thread Rama Kumar


Hi,

Changed udelay() to usleep_range() based on the document in the path, 
"Documentation/timers/timers-howto.rst". It was suggested to use usleep_range() 
function for sleeping duration between 10us - 20 ms. original code used 
udelay() for sleeping 20 us.
 
---
drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c 
b/drivers/staging/fbtft/fb_agm1264k-fl.c
index ec97ad27..471a145e3c00 100644
--- a/drivers/staging/fbtft/fb_agm1264k-fl.c
+++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
@@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)
dev_dbg(par->info->device, "%s()\n", __func__);
 
gpiod_set_value(par->gpio.reset, 0);
-   udelay(20);
+   usleep_range(20,20);
gpiod_set_value(par->gpio.reset, 1);
mdelay(120);
 }
-- 
Signed-off-by: Rama Kumar 

Thanks,
Rama Kumar

2.17.1

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


Re: [PATCH] FBTFT: fb_sh: Changed udelay() to usleep_range() based on the Document, Documentation/timers/timers-howto.rst Excerpt from the document: -SLEEPING FOR ~USECS OR SMALL MSECS ( 10us - 20ms):

2019-11-03 Thread Greg KH
On Sat, Nov 02, 2019 at 07:59:06PM -0500, rama wrote:
> ---
>  drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

- It looks like you did not use your "real" name for the patch on either
  the Signed-off-by: line, or the From: line (both of which have to
  match).  Please read the kernel file, Documentation/SubmittingPatches
  for how to do this correctly.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 275/291] drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707 (fwd)

2019-11-03 Thread Julia Lawall
The return at line 747 may need an unlock.

julia

-- Forwarded message --
Date: Sun, 3 Nov 2019 09:21:22 +0800
From: kbuild test robot 
To: kbu...@lists.01.org
Cc: Julia Lawall 
Subject: [staging:staging-testing 275/291]
drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707

CC: kbuild-...@lists.01.org
CC: de...@driverdev.osuosl.org
TO: Davidlohr Bueso 
CC: "Greg Kroah-Hartman" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   f6ea634f1c01cb75675481318930985d6073632a
commit: 3ae82f449cea00de5cd894feb8e9154b2da99b4e [275/291] 
drivers/staging/exfat: Replace binary semaphores for mutexes
:: branch date: 15 hours ago
:: commit date: 2 days ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 
Reported-by: Julia Lawall 

>> drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707

# 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=3ae82f449cea00de5cd894feb8e9154b2da99b4e
git remote add staging 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
git checkout 3ae82f449cea00de5cd894feb8e9154b2da99b4e
vim +747 drivers/staging/exfat/exfat_super.c

c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  684
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  685  static int ffsReadFile(struct 
inode *inode, struct file_id_t *fid, void *buffer,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  686u64 
count, u64 *rcount)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  687  {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  688 s32 offset, sec_offset, 
clu_offset;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  689 u32 clu;
076a8e2f769e87 Colin Ian King   2019-08-30  690 int ret = 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  691 sector_t LogSector;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  692 u64 oneblkread, 
read_bytes;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  693 struct buffer_head 
*tmp_bh = NULL;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  694 struct super_block *sb 
= inode->i_sb;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  695 struct fs_info_t *p_fs 
= &(EXFAT_SB(sb)->fs_info);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  696 struct bd_info_t *p_bd 
= &(EXFAT_SB(sb)->bd_info);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  697
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  698 /* check the validity 
of the given file id */
3b531807e605bf Valentin Vidic   2019-09-03  699 if (!fid)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  700 return 
FFS_INVALIDFID;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  701
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  702 /* check the validity 
of pointer parameters */
3b531807e605bf Valentin Vidic   2019-09-03  703 if (!buffer)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  704 return 
FFS_ERROR;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  705
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  706 /* acquire the lock for 
file system critical section */
3ae82f449cea00 Davidlohr Bueso  2019-10-30 @707 
mutex_lock(_fs->v_mutex);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  708
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  709 /* check if the given 
file ID is opened */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  710 if (fid->type != 
TYPE_FILE) {
7ca8049f098070 Valdis Kletnieks 2019-10-24  711 ret = -EPERM;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  712 goto out;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  713 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  714
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  715 if (fid->rwoffset > 
fid->size)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  716 fid->rwoffset = 
fid->size;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  717
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  718 if (count > (fid->size 
- fid->rwoffset))
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  719 count = 
fid->size - fid->rwoffset;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  720
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  721 if (count == 0) {
3b531807e605bf Valentin Vidic   2019-09-03  722 if (rcount)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  723 *rcount 
= 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  724 ret = FFS_EOF;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  725 goto out;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  726 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  727
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  728 read_bytes = 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  729
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  730 while (count > 0) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28  731 clu_offset = 
(s32)(fid->rwoffset 

RE:

2019-11-03 Thread SGV INVESTMENT B.V
Did you receive our business proposal email ?

-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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