Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1039906pxu; Mon, 23 Nov 2020 10:04:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/1oWq2cb6eKxx4VL4UcJ8ONNgnyrp9oe0N4hT2O81DFjUW4UzaWX7mndR5M3IecfHNt6J X-Received: by 2002:a17:907:c14:: with SMTP id ga20mr723826ejc.526.1606154681141; Mon, 23 Nov 2020 10:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606154681; cv=none; d=google.com; s=arc-20160816; b=wDNH8rmVg7z/KNDl3ODfAjuxolrvbl99MfFF+jg6zhk83H3LmK6Tbz1doLwg5f7e3K apIqHugQAjR1ZGytaGPE61B4pO2wK00gEuW7vvLhyDPdsWG2SKvWvVoa+2wzYFnXs7qv BZKNULKorpq2sdHAADfgymX+zZ6jBNpT5DzedWDrg0df1P4ge49QyzSknVtU7SwkOT0B E/4sP5v3m02Wj/ux2mijMVwnHZOJoocEUlcTbErWf9fb+QgP1TmEww5fQTVWSJ3rs9OJ eTlLFJD/s4NGdocGB9k4dmOG4g6pccmccvHBLD6VzFuLLuWxjy6N9e7CbEpooD4bj5Cs Ho8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=odtE4Ys4QS3oAUhAEDrg7zwmtXwkB57ie79Y3nim8ug=; b=xPeQPIWTT7HdhPOnuH7BwkAbxQcwZha2ul1QRQvLx3Sv35+UEaz8jFw+fsMQ7ARXhR LNoKX3nn73RIB7MuqDDuWLtoZFWnWH+CvltdLR1beFQ7XIdXUOddK+D1emMSQPv1Lc7W RiPwX76TJS6ohN5FRdyb0YqjdQNKqQZ4SLsSQJFjT1ZIV4hS4f8oyhFO36D+bobERQgC 2GMeC2HzgjcUe7HUOiolsmWyLH9OZKxVeV9C4LEKzyxUbGR+6fJ8TvBc9JPD88vu4Nat OsdpOUPfRS+nw54BGqOOLQeCwY9kYSkiszX7fKz/q0r6YUAhRtJVGuxyQ6alITJsqgBw d6rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si2821568ejf.167.2020.11.23.10.04.17; Mon, 23 Nov 2020 10:04:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390698AbgKWSBi (ORCPT + 99 others); Mon, 23 Nov 2020 13:01:38 -0500 Received: from mga03.intel.com ([134.134.136.65]:48542 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729478AbgKWSBh (ORCPT ); Mon, 23 Nov 2020 13:01:37 -0500 IronPort-SDR: mRVV6QwZPPbhrIYnYk4XPcr5iHAH279m9fgDpcm3/Kxlp7bdJjSE+2ejV4X9CYgAZEpwLVD/8J /nGVgVQSRFxw== X-IronPort-AV: E=McAfee;i="6000,8403,9814"; a="171911210" X-IronPort-AV: E=Sophos;i="5.78,364,1599548400"; d="scan'208";a="171911210" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2020 10:01:24 -0800 IronPort-SDR: MsDe+LYjN7TG23OEkvmmtHMZmPbqJYdHJcKYbJQVatrwwaDMQWr3/64N4q9lac123QLiRYaKVf Rq+rUZkFhx6A== X-IronPort-AV: E=Sophos;i="5.78,364,1599548400"; d="scan'208";a="327279699" Received: from suygunge-mobl.ger.corp.intel.com (HELO localhost) ([10.249.40.108]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2020 10:01:20 -0800 From: Jani Nikula To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, 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 1/6] relay: allow the use of const callback structs In-Reply-To: <20201119081120.GA6149@infradead.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20201118165320.26829-1-jani.nikula@intel.com> <20201119081120.GA6149@infradead.org> Date: Mon, 23 Nov 2020 20:01:17 +0200 Message-ID: <87pn44lzpu.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Nov 2020, Christoph Hellwig wrote: > But taking one step back: All instances implement create_buf_file > and remove_buf_file, which makes sense as that is the prime aim > of these methods. So there is no point in making those optional. > subbuf_start_callback is overriden by two instances, so making that > optional totally makes sense. buf_mapped and buf_unmapped are > never overriden, so they should be removed entirely. > > More importantly there is no case that passes a NULL rchan_callbacks, > which makes complete sense as it wouldn't even create a file. So > remove that case as well and just replace it with a sanity check in > relay_open(). Many thanks for the feedback; sent v2 [1]. BR, Jani. [1] http://lore.kernel.org/r/cover.1606153547.git.jani.nikula@intel.com -- Jani Nikula, Intel Open Source Graphics Center