Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4437839pxb; Tue, 31 Aug 2021 05:20:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIsIXjQIx+H8iZV/57jdjOgro46MiE9xZxBIEBQ0CbRDS6jA1k7vbYs9cecuIw2A16I0Gh X-Received: by 2002:a6b:5819:: with SMTP id m25mr22259526iob.105.1630412411992; Tue, 31 Aug 2021 05:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630412411; cv=none; d=google.com; s=arc-20160816; b=sRsvbhGFq8hsy0b02V7FrXw1XyqY3hyUYN3uhRXZk/UyL60zMtisYQNJlHYYMSytl5 wnmj0kVuupatbrc/f1cfMJjvt1mfdDXz927Y9QKp1RHdO1mtYw6jOvbfM8qzxSw9hy41 y67XRSY8lxtHas4QvFilmraZQU4VgUh35sOP1rC9wQaq5FZ/xn5wgmDjLXQyBYWym33M PaEfCZi+zytD8X/P56d9R+WhYW0RepfBmLkj5/E7NvSWKlaVaGUcPsj2kw7g9hEbUJ1g ScuXJIEY+4suXav50f95wAt35KYJsBJk+ezKHyYih64lIGVMW/o57AkcBkIZadfH4W0P IHMA== 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=bShuVu6H/yzk8qdZpEAgE6WBzPK8NccpdwI1SQ5Aa5g=; b=QVSITMMRrY5A/RB2kJKZU9ctNdOQCLW5P8kaT1Fnxg0Sg6SazDQnMZYEtczqqyv6SX NY4zTnjNwd6to/cDh2PxFGDEAS9KpVwXBpK/o6Aq9g9dDfovFQ2HUXpEN075CteirkiF eJQil0TCHwEuel9GCEHACzqxh/rBw0dsoEP4ScfC9zbbk1SzmJgs+mzWa76VyWTtUN6N ktcLP2h1Dsi2yYwmD+zdWRuReh7ABDzAsqLTSgKg3IxUK7Cv9/ZWXe1RKKYbUq+Jv6x9 7BxnD5O5CqNfEWv0Nt2i/08iCvF88PqYzM+yE8vDnwx1XMinnVFHENGhkmquI7YXDbD5 Y92Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q3akqxME; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si18905247ilu.22.2021.08.31.05.19.59; Tue, 31 Aug 2021 05:20:11 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q3akqxME; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233654AbhHaMUE (ORCPT + 99 others); Tue, 31 Aug 2021 08:20:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:52908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239083AbhHaMTb (ORCPT ); Tue, 31 Aug 2021 08:19:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7FC4F60200; Tue, 31 Aug 2021 12:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630412315; bh=RKmHEBBqe+fABZVLSlBOdZnAUww2NeSx7NR1sqNQevs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q3akqxME9qMngNOJsq4ob1d5h8OMuZBOJr8QNYr8ONAZAnjIWPGzMKUPevc883mxN Nvz15u+l1Wpnzb1ylKnwuqA+20/70LTIhRs3vtWwoGOhXgU5v3C+Dr2Vg3XL503UxD Eb3+SnVuzgsVCfDZDgiTBw3oMoPReS+lIpxHnYkBIR/l9pHXV3Pi9hwLFrwqEC0IVZ XbzEG7Psb8RelEUc1/03EKOyFmIgPn+Ucs1NddFguIkgNZg9a/6P0TK+fRH/NULso8 juU66L4h5DF7xY8mi1xC5LDXCWjc13wpXzTgi9vrCeCz40u2Z2xb8hLVfrVA+vh+0b DzU9mIm9vSyyg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1mL2ii-0004il-2r; Tue, 31 Aug 2021 14:18:28 +0200 Date: Tue, 31 Aug 2021 14:18:28 +0200 From: Johan Hovold To: "Fabio M. De Francesco" Cc: Alex Elder , Matthew Wilcox , Alex Elder , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org Subject: Re: [greybus-dev] [PATCH v4] staging: greybus: Convert uart.c from IDR to XArray Message-ID: References: <20210829092250.25379-1-fmdefrancesco@gmail.com> <6155058.TBsaUTXu4T@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6155058.TBsaUTXu4T@localhost.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 31, 2021 at 01:50:05PM +0200, Fabio M. De Francesco wrote: > On Tuesday, August 31, 2021 10:07:38 AM CEST Johan Hovold wrote: > > Since most people can't really test their changes to Greybus perhaps it > > isn't the best example of code that can be safely modified. But yeah, > > parts of it are still in staging and, yes, staging has been promoted as > > place were some churn is accepted. > I cannot test my changes to Greybus, but I think that trivial changes are > just required to build. To stay on the safe side I had left those > mutex_lock() around xa_load(). I wasn't sure about it, but since the original > code had the Mutexes I thought it wouldn't hurt to leave them there. But if you weren't sure that your patch was correct, you can't also claim that it was trivial. Patches dealing with locking and concurrency usually are not. I too had go look up the XArray interface and review the Greybus uart code (which is broken and that doesn't make it easier for any of us). So no, this wasn't trivial, it carries a cost and should therefore in the end also have some gain. And what that was wasn't clear from the commit message (since any small efficiency gain is irrelevant in this case). Sorry you got stuck in the middle. Perhaps you can see it as a first-hand experience of some of the trade offs involved when doing kernel development. And remember that a good commit message describing the motivation for the change (avoiding boiler-plate marketing terms) is a good start if you want to get your patches accepted. Johan