lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 2/7] net: ipa: synchronize NAPI only for suspend
On Wed,  3 Feb 2021 09:28:50 -0600 Alex Elder wrote:
> int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop)
> {
> struct gsi_channel *channel = &gsi->channel[channel_id];
> + int ret;
>
> - return __gsi_channel_stop(channel, stop);
> + /* Synchronize NAPI if successful, to ensure polling has finished. */
> + ret = __gsi_channel_stop(channel, stop);
> + if (!ret)
> + napi_synchronize(&channel->napi);
> +
> + return ret;

nit:

ret = function();
if (ret)
return ret;

/* success path: do something else */

return 0;

\
 
 \ /
  Last update: 2021-02-05 05:56    [W:0.101 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site