On 11/29/18 10:38 AM, Keith Busch wrote:
> On Thu, Nov 29, 2018 at 10:06:20AM -0700, Jens Axboe wrote:
>> On 11/29/18 10:04 AM, Christoph Hellwig wrote:
>>> gcc never warns about unused static inline functions. Which makes a lot
>>> of sense at least for headers..
>>
>> Not so much for non-headers
On Thu, Nov 29, 2018 at 10:06:20AM -0700, Jens Axboe wrote:
> On 11/29/18 10:04 AM, Christoph Hellwig wrote:
> > gcc never warns about unused static inline functions. Which makes a lot
> > of sense at least for headers..
>
> Not so much for non-headers :-)
You can #include .c files too! :)
On 11/29/18 10:04 AM, Christoph Hellwig wrote:
> On Thu, Nov 29, 2018 at 10:02:25AM -0700, Jens Axboe wrote:
>> On 11/29/18 8:47 AM, Christoph Hellwig wrote:
+static inline int nvme_next_ring_index(struct nvme_queue *nvmeq, u16
index)
+{
+ if (++index == nvmeq->q_depth)
+
On Thu, Nov 29, 2018 at 10:02:25AM -0700, Jens Axboe wrote:
> On 11/29/18 8:47 AM, Christoph Hellwig wrote:
> >> +static inline int nvme_next_ring_index(struct nvme_queue *nvmeq, u16
> >> index)
> >> +{
> >> + if (++index == nvmeq->q_depth)
> >> + return 0;
> >> +
> >> + return index;
>
On 11/29/18 8:47 AM, Christoph Hellwig wrote:
>> +static inline int nvme_next_ring_index(struct nvme_queue *nvmeq, u16 index)
>> +{
>> +if (++index == nvmeq->q_depth)
>> +return 0;
>> +
>> +return index;
>> +}
>
> This is unused now.
Huh, wonder how I missed that. GCC must not
> +static inline int nvme_next_ring_index(struct nvme_queue *nvmeq, u16 index)
> +{
> + if (++index == nvmeq->q_depth)
> + return 0;
> +
> + return index;
> +}
This is unused now.
Also what about this little cleanup on top?
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/
Split the command submission and the SQ doorbell ring, and add the
doorbell ring as our ->commit_rqs() hook. This allows a list of
requests to be issued, with nvme only writing the SQ update when
it's necessary. This is more efficient if we have lists of requests
to issue, particularly on virtualiz