1. 02 Nov, 2020 15 commits
  2. 31 Oct, 2020 2 commits
  3. 28 Oct, 2020 19 commits
  4. 27 Oct, 2020 1 commit
  5. 26 Oct, 2020 3 commits
    • Bob Pearson's avatar
      RDMA/rxe: Remove unused RXE_MR_TYPE_FMR · eeed6965
      Bob Pearson authored
      This is a left over from the past. It is no longer used.
      
      Link: https://lore.kernel.org/r/20201009165112.271143-1-rpearson@hpe.comSigned-off-by: default avatarBob Pearson <rpearson@hpe.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      eeed6965
    • Joe Perches's avatar
      RDMA: Convert sysfs kobject * show functions to use sysfs_emit() · 3c6bff3c
      Joe Perches authored
      Done with cocci script:
      
      @@
      identifier k_show;
      identifier arg1, arg2, arg3;
      @@
      ssize_t k_show(struct kobject *
      -	arg1
      +	kobj
      	, struct kobj_attribute *
      -	arg2
      +	attr
      	, char *
      -	arg3
      +	buf
      	)
      {
      	...
      (
      -	arg1
      +	kobj
      |
      -	arg2
      +	attr
      |
      -	arg3
      +	buf
      )
      	...
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	return
      -	sprintf(buf,
      +	sysfs_emit(buf,
      	...);
      	...>
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	return
      -	snprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	return
      -	scnprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      expression chr;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	return
      -	strcpy(buf, chr);
      +	sysfs_emit(buf, chr);
      	...>
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      identifier len;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	len =
      -	sprintf(buf,
      +	sysfs_emit(buf,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      identifier len;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	len =
      -	snprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      identifier len;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      	len =
      -	scnprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      identifier len;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	<...
      -	len += scnprintf(buf + len, PAGE_SIZE - len,
      +	len += sysfs_emit_at(buf, len,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier k_show;
      identifier kobj, attr, buf;
      expression chr;
      @@
      
      ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
      {
      	...
      -	strcpy(buf, chr);
      -	return strlen(buf);
      +	return sysfs_emit(buf, chr);
      }
      
      Link: https://lore.kernel.org/r/7761c1efaebb96c432c85171d58405c25a824ccd.1602122880.git.joe@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
      Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Acked-by: default avatarJack Wang <jinpu.wang@cloud.ionos.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      3c6bff3c
    • Joe Perches's avatar
      RDMA: Convert sysfs device * show functions to use sysfs_emit() · 1c7fd726
      Joe Perches authored
      Done with cocci script:
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	return
      -	sprintf(buf,
      +	sysfs_emit(buf,
      	...);
      	...>
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	return
      -	snprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	return
      -	scnprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      expression chr;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	return
      -	strcpy(buf, chr);
      +	sysfs_emit(buf, chr);
      	...>
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      identifier len;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	len =
      -	sprintf(buf,
      +	sysfs_emit(buf,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      identifier len;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	len =
      -	snprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      identifier len;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      	len =
      -	scnprintf(buf, PAGE_SIZE,
      +	sysfs_emit(buf,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      identifier len;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	<...
      -	len += scnprintf(buf + len, PAGE_SIZE - len,
      +	len += sysfs_emit_at(buf, len,
      	...);
      	...>
      	return len;
      }
      
      @@
      identifier d_show;
      identifier dev, attr, buf;
      expression chr;
      @@
      
      ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf)
      {
      	...
      -	strcpy(buf, chr);
      -	return strlen(buf);
      +	return sysfs_emit(buf, chr);
      }
      
      Link: https://lore.kernel.org/r/7f406fa8e3aa2552c022bec680f621e38d1fe414.1602122879.git.joe@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
      Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      1c7fd726