Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2645641ybv; Sat, 15 Feb 2020 00:13:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzuxU8GAdlIUfjvLWDIv15rS82cJmLTpA9EIPLEXj0GePQJS+YkCEVzORZwsmwapsGmc+r5 X-Received: by 2002:a9d:ecc:: with SMTP id 70mr5091682otj.182.1581754385791; Sat, 15 Feb 2020 00:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581754385; cv=none; d=google.com; s=arc-20160816; b=ge1WwYRXFiqXL47wWffYUXxBAgTb1EUjC9+AQUe/QdA0lr3KY0NxElekV13P9/MfE0 I8r1ZXAOB0a63sB1o51IaCGoCSxuZ1x5CagWLj97WkP6HxXUlTXtRVlG3vi9Z6zO4nzl e6BdHrNnOgKkg6XWBz/CqxOUHMPnW4ZFzrEPFwf2nCOImfSeWyFlZjA6KJiEeEafC/xb jLaO5RMcKnbvFiqYH41kssrzoQuuQklkWQroQ9aQw7J9+uB18L4JLixgxmuoeZIdaFSD DFNNn7fCJ2ZelLmBypDVDFpuG61Z3q5fw2C36WhoUYUhUbr2y6jXyBwFoMTCWfqv4eYG k3OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=FpEmFRwOH3JEQ4UX1ZlcrN45FgrsAi2uGCdqlL0oSgo=; b=k/K3KQ4RK37LcuEQRgSDinaxLDwZ7MV/hhgK30IdoifS2AWk0htkgWbEdYUSuUaFsT 63wdM0vO1O39TyeIltItRK1ugsShEUrtOHxH+zs2AH+6v2R5h8WvfLwVGgL/J204NF75 TPqvZa1Op6UnNWFO7Q5ytODAEc8sL7aIfZXaew1XLMaWRSeo03YcKBXyRefgBCMN+ucr J2hKTeG5utzDa8KVtE/vgPO1Ze9DTxDoTK4NZbos5+DC4voFRYzbcAA5bM7p1/GW00D3 wVFDcDmBuzXzC9XpsMJgbpK2zNmOS2V8DK9jbAbxEW2ppaTM+gURlNpqapcX/LSqjCNY 5kKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si3955853oth.175.2020.02.15.00.12.41; Sat, 15 Feb 2020 00:13:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbgBOILo (ORCPT + 99 others); Sat, 15 Feb 2020 03:11:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:38830 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgBOILo (ORCPT ); Sat, 15 Feb 2020 03:11:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1BFADAE52; Sat, 15 Feb 2020 08:11:41 +0000 (UTC) Date: Sat, 15 Feb 2020 09:11:39 +0100 From: Jean Delvare To: Wolfram Sang Cc: Wolfram Sang , linux-i2c@vger.kernel.org, Benjamin Tissoires , Phil Reid , Robert Richter , George Cherian , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR Message-ID: <20200215091139.0311bc7b@endymion> In-Reply-To: <20200215065018.GA1005@ninjato> References: <20200210172929.6001-1-wsa+renesas@sang-engineering.com> <20200210172929.6001-2-wsa+renesas@sang-engineering.com> <20200215072020.75b1b772@endymion> <20200215065018.GA1005@ninjato> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 15 Feb 2020 07:50:18 +0100, Wolfram Sang wrote: > On Sat, Feb 15, 2020 at 07:20:20AM +0100, Jean Delvare wrote: > > Hi Wolfram, > > > > On Mon, 10 Feb 2020 18:29:25 +0100, Wolfram Sang wrote: > > > Only few drivers use this call, so drivers and I2C core are converted at > > > once with this patch. By simply using i2c_new_client_device() instead of > > > i2c_new_device(), we easily can return an ERRPTR for this function as > > > well. To make out of tree users aware that something changed, the > > > function is renamed to i2c_install_smbus_alert(). > > > > I wouldn't bother renaming the function. Chances that there actually > > are out-of-tree users of this function are pretty small, and if that is > > the case, they can adjust their code easily in a way that is still > > compatible with old kernels. > > Agreed, it is easy. But they need to *know* that they need to adjust. > Build error makes it obvious. Otherwise, the code will compile and > silently not work anymore, I am afraid. The code will keep working as long as there is no error, which is a rare situation. If/when it happens, they'll get a very visible error message in their kernel log. I understand that this makes them discover the problem later. But we are talking about a case which most likely does not exist. On the other hand, renaming makes compatibility harder to achieve for them in the long term (#ifdefs needed forever), and it makes the work of the distribution kernel maintainers harder. I don't think we should make our lives harder to help people who keep their kernel drivers out of tree. If they are not happy, they know what they should do. Just my 2 cents anyway, your call. -- Jean Delvare SUSE L3 Support