Feng Liu
2023-Mar-08 14:07 UTC
[PATCH 3/3] virtio_ring: Use const to annotate read-only pointer params
On 2023-03-08 a.m.12:58, Jason Wang wrote:> External email: Use caution opening links or attachments > > > On Tue, Mar 7, 2023 at 11:57?AM Feng Liu <feliu at nvidia.com> wrote: >> >> Add const to make the read-only pointer parameters clear, similar to >> many existing functions. >> >> Signed-off-by: Feng Liu <feliu at nvidia.com> >> Reviewed-by: Jiri Pirko <jiri at nvidia.com> >> Reviewed-by: Parav Pandit <parav at nvidia.com> >> Reviewed-by: Gavin Li <gavinl at nvidia.com> >> Reviewed-by: Bodong Wang <bodong at nvidia.com> >> --- >> drivers/virtio/virtio_ring.c | 25 ++++++++++++------------- >> include/linux/virtio.h | 12 ++++++------ >> 2 files changed, 18 insertions(+), 19 deletions(-) >> > > [...] > >> >> -/* >> - * This should prevent the device from being used, allowing drivers to >> +/ This should prevent the device from being used, allowing drivers to >> * recover. You may need to grab appropriate locks to flush. >> */ > > Any reason for this change? >Hi, Jason The original comment of the code had a syntax problem and couldn't compile, I fixed it here> Thanks >
Feng Liu
2023-Mar-08 14:13 UTC
[PATCH 3/3] virtio_ring: Use const to annotate read-only pointer params
On 2023-03-08 a.m.9:07, Feng Liu via Virtualization wrote:> External email: Use caution opening links or attachments > > > On 2023-03-08 a.m.12:58, Jason Wang wrote: >> External email: Use caution opening links or attachments >> >> >> On Tue, Mar 7, 2023 at 11:57?AM Feng Liu <feliu at nvidia.com> wrote: >>> >>> Add const to make the read-only pointer parameters clear, similar to >>> many existing functions. >>> >>> Signed-off-by: Feng Liu <feliu at nvidia.com> >>> Reviewed-by: Jiri Pirko <jiri at nvidia.com> >>> Reviewed-by: Parav Pandit <parav at nvidia.com> >>> Reviewed-by: Gavin Li <gavinl at nvidia.com> >>> Reviewed-by: Bodong Wang <bodong at nvidia.com> >>> --- >>> ? drivers/virtio/virtio_ring.c | 25 ++++++++++++------------- >>> ? include/linux/virtio.h?????? | 12 ++++++------ >>> ? 2 files changed, 18 insertions(+), 19 deletions(-) >>> >> >> [...] >> >>> >>> -/* >>> - * This should prevent the device from being used, allowing drivers to >>> +/ This should prevent the device from being used, allowing drivers to >>> ?? * recover.? You may need to grab appropriate locks to flush. >>> ?? */ >> >> Any reason for this change? >> > Hi, Jason > The original comment of the code had a syntax problem and couldn't > compile, I fixed it here >Sorry, there is a mistake, I will fixed it>> Thanks >> > _______________________________________________ > Virtualization mailing list > Virtualization at lists.linux-foundation.org > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.linuxfoundation.org%2Fmailman%2Flistinfo%2Fvirtualization&data=05%7C01%7Cfeliu%40nvidia.com%7C2d406388e866407a3a6408db1fde8819%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638138812857391646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oXojhNtxM4SKAzznawQSIGU11XqbhVCCUFB6DXJooIQ%3D&reserved=0
Michael S. Tsirkin
2023-Mar-08 14:16 UTC
[PATCH 3/3] virtio_ring: Use const to annotate read-only pointer params
On Wed, Mar 08, 2023 at 09:07:49AM -0500, Feng Liu wrote:> > > On 2023-03-08 a.m.12:58, Jason Wang wrote: > > External email: Use caution opening links or attachments > > > > > > On Tue, Mar 7, 2023 at 11:57?AM Feng Liu <feliu at nvidia.com> wrote: > > > > > > Add const to make the read-only pointer parameters clear, similar to > > > many existing functions. > > > > > > Signed-off-by: Feng Liu <feliu at nvidia.com> > > > Reviewed-by: Jiri Pirko <jiri at nvidia.com> > > > Reviewed-by: Parav Pandit <parav at nvidia.com> > > > Reviewed-by: Gavin Li <gavinl at nvidia.com> > > > Reviewed-by: Bodong Wang <bodong at nvidia.com> > > > --- > > > drivers/virtio/virtio_ring.c | 25 ++++++++++++------------- > > > include/linux/virtio.h | 12 ++++++------ > > > 2 files changed, 18 insertions(+), 19 deletions(-) > > > > > > > [...] > > > > > > > > -/* > > > - * This should prevent the device from being used, allowing drivers to > > > +/ This should prevent the device from being used, allowing drivers to > > > * recover. You may need to grab appropriate locks to flush. > > > */ > > > > Any reason for this change? > > > Hi, Jason > The original comment of the code had a syntax problem and couldn't compile, > I fixed it hereThis is how it looked before your patch: /* * This should prevent the device from being used, allowing drivers to * recover. You may need to grab appropriate locks to flush. */ I see no problem here.> > Thanks > >