Skip to content

Commit 86e17a5

Browse files
YongjiXiemstsirkin
authored andcommitted
vdpa: Fix some coding style issues
Fix some code indent issues and following checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' 371: FILE: include/linux/vdpa.h:371: +static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset, Signed-off-by: Xie Yongji <[email protected]> Acked-by: Jason Wang <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 9c93005 commit 86e17a5

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

include/linux/vdpa.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ struct vdpa_vq_state_split {
4343
* @last_used_idx: used index
4444
*/
4545
struct vdpa_vq_state_packed {
46-
u16 last_avail_counter:1;
47-
u16 last_avail_idx:15;
48-
u16 last_used_counter:1;
49-
u16 last_used_idx:15;
46+
u16 last_avail_counter:1;
47+
u16 last_avail_idx:15;
48+
u16 last_used_counter:1;
49+
u16 last_used_idx:15;
5050
};
5151

5252
struct vdpa_vq_state {
53-
union {
54-
struct vdpa_vq_state_split split;
55-
struct vdpa_vq_state_packed packed;
56-
};
53+
union {
54+
struct vdpa_vq_state_split split;
55+
struct vdpa_vq_state_packed packed;
56+
};
5757
};
5858

5959
struct vdpa_mgmt_dev;
@@ -131,7 +131,7 @@ struct vdpa_iova_range {
131131
* @vdev: vdpa device
132132
* @idx: virtqueue index
133133
* @state: pointer to returned state (last_avail_idx)
134-
* @get_vq_notification: Get the notification area for a virtqueue
134+
* @get_vq_notification: Get the notification area for a virtqueue
135135
* @vdev: vdpa device
136136
* @idx: virtqueue index
137137
* Returns the notifcation area
@@ -350,25 +350,25 @@ static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev)
350350

351351
static inline void vdpa_reset(struct vdpa_device *vdev)
352352
{
353-
const struct vdpa_config_ops *ops = vdev->config;
353+
const struct vdpa_config_ops *ops = vdev->config;
354354

355355
vdev->features_valid = false;
356-
ops->set_status(vdev, 0);
356+
ops->set_status(vdev, 0);
357357
}
358358

359359
static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
360360
{
361-
const struct vdpa_config_ops *ops = vdev->config;
361+
const struct vdpa_config_ops *ops = vdev->config;
362362

363363
vdev->features_valid = true;
364-
return ops->set_features(vdev, features);
364+
return ops->set_features(vdev, features);
365365
}
366366

367-
368-
static inline void vdpa_get_config(struct vdpa_device *vdev, unsigned offset,
369-
void *buf, unsigned int len)
367+
static inline void vdpa_get_config(struct vdpa_device *vdev,
368+
unsigned int offset, void *buf,
369+
unsigned int len)
370370
{
371-
const struct vdpa_config_ops *ops = vdev->config;
371+
const struct vdpa_config_ops *ops = vdev->config;
372372

373373
/*
374374
* Config accesses aren't supposed to trigger before features are set.

0 commit comments

Comments
 (0)