From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4C4DC83F3F for ; Mon, 4 Sep 2023 08:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350558AbjIDIzw (ORCPT ); Mon, 4 Sep 2023 04:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbjIDIzv (ORCPT ); Mon, 4 Sep 2023 04:55:51 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16E85131; Mon, 4 Sep 2023 01:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693817748; x=1725353748; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=Bjr8VKvgs/rVspRwakQ9zo2f6fkmmFaw7ymumH5rC6w=; b=JF7szY1Gx76t3KxnnSO3qTWH4kSiLltz21zN8HiLWfWLqTkrdbA3zONb +0NBc4cge3G3V5lv/VSKx7P8WKhvy3yhUpyDc6toQBC9Ni9B0dC14d6rF SexkVsrUze4wepshyz0yICkweVWu2dOaGzytdhgvbhuB0twF5gKE1fCsx O8OTdMBvNQ+X5Xw1PLynWjBVNUO7a63E7nNVXRAJGdpIDnJRwATkSPHd7 TQJUkabzt5E6WezHiPP7f5Op2LrCAZYzWM658I3MK1cbn6dcdNSLGbf+9 orlezqKTRIUbTl15f1gtvNt7co8hHvuLxrWs+VY7/0tB6FfNPuUuwupox g==; X-IronPort-AV: E=McAfee;i="6600,9927,10822"; a="462920560" X-IronPort-AV: E=Sophos;i="6.02,225,1688454000"; d="scan'208";a="462920560" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 01:55:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10822"; a="769913289" X-IronPort-AV: E=Sophos;i="6.02,225,1688454000"; d="scan'208";a="769913289" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 01:55:43 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qd5My-006NXI-0v; Mon, 04 Sep 2023 11:55:40 +0300 Date: Mon, 4 Sep 2023 11:55:39 +0300 From: Andy Shevchenko To: Linus Walleij Cc: Mark Brown , Bartosz Golaszewski , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Dan Carpenter Subject: Re: [RFT PATCH v2] spi: bcm2835: reduce the abuse of the GPIO API Message-ID: References: <20230901111548.12733-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 02, 2023 at 06:56:51PM +0200, Linus Walleij wrote: > On Fri, Sep 1, 2023 at 2:31 PM Mark Brown wrote: > > > > > + struct gpiod_lookup_table *lookup __free(kfree) = NULL; > > > > > Whoa! > > > This is really neat. > > > As noted, it will confuse static checkers at no end, but they just have > > > to adopt. (CC to Dan C if he now runs into this.) > > > > It also doesn't look amazing for humans, it's very not C like... > > and the __free() macro was introduced by Peter > Z who also very famously suggested (OTOMH!) that instead of > adopting Rust to the kernel it would be possible to bring the > desired Rust features into C. Competition is always good :-) > Which is what he does, well the feature has been there for a while > but he identified it and made it easily accessible. > > Now if this path is desirable ... yeah. Maybe a matter of taste. -- With Best Regards, Andy Shevchenko