Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1504262pxu; Tue, 24 Nov 2020 01:46:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJDisFITpx6XfaZPvjTYftV79+mc030StA8fzDD3ZizeEt/hEv4hVFTKq6pwJRbqTiyRi3 X-Received: by 2002:a17:906:6683:: with SMTP id z3mr3302636ejo.27.1606211201636; Tue, 24 Nov 2020 01:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606211201; cv=none; d=google.com; s=arc-20160816; b=xy9wZIlVxct1L8oqx82cfZxLcK1Og/TABSiGppWtP47z4NXZwlKUiDTnppOrThxvFD 82pmkb8neRvPsxAymBfEDf3ijGOguIczgohsZoilReM8lihlNfyGTCwyJd9qLI375Qzc dO/7L0p1kcKAKKAVOQUFwUR82s7aIHUgD3B7abNYj1q7iqZEV+6UTL6d8m/hw9tauXY1 f2NEiksqBMwLJoGaLgN+KN9kjajM2iO5yeXZ0e9d+YbGk5FR7ZnYLHIK68z3nGm2oWsx 5mFXFgW3HcH/otQUyhrWY2DZ79/nFVAjM6N2xQ9RlvBZg916FNG5A8NuHKYoZ2F91T6B Pg4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7Z4sCBK7+r3zxiDTPSYcv0Xe629cAkXNqDnpxaka9BI=; b=O83Y6joUoe3orMMKmYxi01bsSCyat+fungGOzcjlchVWfVkgi6fhHEKC9hczp1nHFk j7aztEPoUJ4v4IzI4I1UuS+YCcd06OnGtdxAyjoWRfNaVMijXZRzJMe2fHKSHxINBlNM ivmw5ffGqxXKw58PJ2vlycWlPNb0Sw1uE/TqaiL3cVC74SQw5y6azVDt8h1csL/ew/aI /tseN7ecXkqkDFeI5hZuD5tf+1F+m3omsJ0rxL5qzRdwXC52hITnob3KasOjAC3Ep27w xqOFlswqYgkbmHqM1pnuByt8SzzgKXUV4cw5V+RPvtbxVoS7clb+dp96JGfDlWh0lPeG StBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kiCSZDEg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp24si3652275ejc.590.2020.11.24.01.46.17; Tue, 24 Nov 2020 01:46:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kiCSZDEg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731456AbgKXJmN (ORCPT + 99 others); Tue, 24 Nov 2020 04:42:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731433AbgKXJmM (ORCPT ); Tue, 24 Nov 2020 04:42:12 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 584DBC0613D6; Tue, 24 Nov 2020 01:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7Z4sCBK7+r3zxiDTPSYcv0Xe629cAkXNqDnpxaka9BI=; b=kiCSZDEgg3lnkgExk/osaqCd9M ULK/cxluf5kC4iJST/I3Ul0DnxDBfU3QAGlbeA8q7avb0PHFcWZVVhSW3iqtM6ihK5yNIA7IOk5Hk DnQZovtZqURQZbw/kpyVF4AxKFpUoBiLJmz7vfxKVTU0dNlPQWNHSDK0UrnwqBTD7Ik2FHtzQ7m2X 5N/DIPf9z5ygV9AjUpu+3q+8L2YNu8GP8qMJ8LqQGi+XyG1UeUtqvNWUHjOsqvTSm1ATTc2mQHvLG /OcZGPX86MAHIASoVJVwPqBaOpT/YmN34xAqUeLKmYFOrnh7Rv1E4hV47ZlVS0oUt/eXqBYssoin9 lpso3lNg==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1khUpt-0000OQ-6d; Tue, 24 Nov 2020 09:42:09 +0000 Date: Tue, 24 Nov 2020 09:42:09 +0000 From: Christoph Hellwig To: Jani Nikula Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Andrew Morton , intel-gfx@lists.freedesktop.org, linux-block@vger.kernel.org, Jens Axboe , ath11k@lists.infradead.org, ath10k@lists.infradead.org, Kalle Valo , linux-wireless@vger.kernel.org, QCA ath9k Development Subject: Re: [PATCH 4/9] relay: allow the use of const callback structs Message-ID: <20201124094209.GD31963@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > +/* subbuf_start callback wrapper */ > +static int cb_subbuf_start(struct rchan_buf *buf, void *subbuf, > + void *prev_subbuf, size_t prev_padding) I don't think the comment adds any information over just looking at the function and the two callers. I'd also name it relay_subbuf_start instead of the cb_ prefix not used anywhere else in the file. > { > + if (buf->chan->cb->subbuf_start) > + return buf->chan->cb->subbuf_start(buf, subbuf, > + prev_subbuf, prev_padding); > + > if (relay_buf_full(buf)) > return 0; This could also be simplified a bit more to: if (!buf->chan->cb->subbuf_start) return !relay_buf_full(buf); return buf->chan->cb->subbuf_start(buf, subbuf, prev_subbuf, prev_padding); Otherwise this looks good to me: Reviewed-by: Christoph Hellwig