mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd
Pull iommufd fixes from Jason Gunthorpe:
"Two build fixes, no functional change:
- Fix a possible compiler error around counted_by() due to wrong
initialization order
- Fix a -Wflex-array-member-not-at-end"
* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
iommufd/iommufd_private.h: Avoid -Wflex-array-member-not-at-end warning
iommufd/driver: Fix counter initialization for counted_by annotation
This commit is contained in:
@@ -161,8 +161,8 @@ int iommufd_viommu_report_event(struct iommufd_viommu *viommu,
|
|||||||
vevent = &veventq->lost_events_header;
|
vevent = &veventq->lost_events_header;
|
||||||
goto out_set_header;
|
goto out_set_header;
|
||||||
}
|
}
|
||||||
memcpy(vevent->event_data, event_data, data_len);
|
|
||||||
vevent->data_len = data_len;
|
vevent->data_len = data_len;
|
||||||
|
memcpy(vevent->event_data, event_data, data_len);
|
||||||
veventq->num_events++;
|
veventq->num_events++;
|
||||||
|
|
||||||
out_set_header:
|
out_set_header:
|
||||||
|
|||||||
@@ -614,7 +614,6 @@ struct iommufd_veventq {
|
|||||||
struct iommufd_eventq common;
|
struct iommufd_eventq common;
|
||||||
struct iommufd_viommu *viommu;
|
struct iommufd_viommu *viommu;
|
||||||
struct list_head node; /* for iommufd_viommu::veventqs */
|
struct list_head node; /* for iommufd_viommu::veventqs */
|
||||||
struct iommufd_vevent lost_events_header;
|
|
||||||
|
|
||||||
enum iommu_veventq_type type;
|
enum iommu_veventq_type type;
|
||||||
unsigned int depth;
|
unsigned int depth;
|
||||||
@@ -622,6 +621,9 @@ struct iommufd_veventq {
|
|||||||
/* Use common.lock for protection */
|
/* Use common.lock for protection */
|
||||||
u32 num_events;
|
u32 num_events;
|
||||||
u32 sequence;
|
u32 sequence;
|
||||||
|
|
||||||
|
/* Must be last as it ends in a flexible-array member. */
|
||||||
|
struct iommufd_vevent lost_events_header;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct iommufd_veventq *
|
static inline struct iommufd_veventq *
|
||||||
|
|||||||
Reference in New Issue
Block a user