Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1417761ybi; Tue, 16 Jul 2019 14:47:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5eXtNBdVlChgY9YXj5JnFHIoqOjM02FKQzVeCQ6q0LoiR/kI6KkpZ+AAszXJEnXdWMYTD X-Received: by 2002:a17:902:a03:: with SMTP id 3mr37981950plo.302.1563313660742; Tue, 16 Jul 2019 14:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563313660; cv=none; d=google.com; s=arc-20160816; b=Bug0M/BJKW2ND33sGPDhJ+A/y719ibaWp9TkPQx6n9VWspsipH2mYYaIfNsyxZRyLZ u5HOAfm9i+nnYHL2img5d6Upya3fFLiP5+Hso6/0EBo+2rrlPop1muFPUzlODGUpRKRg AZjnx5WF8GFit+q7tlI1iKdt/Yudd675WdxFF7umZFV/zqJ0IsUrw3qy9ODHfUA2RXkF WU/3Kdmi93xaoeXZw/XKef5v0R01ZYKJWL+hcDU+VOeaN7IiIBfEFEtxehwR4E034SYJ n1yEtB/NjcFHh/yrJ5FFFVSqf6rBcN4N8otdIr8c5RoTibpcSUyF5xJLr8fkpv8b21CC DQog== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/RAqXRe608t4DMx9FGyKisTh63SKLqBM/Ij+WPbCgPM=; b=xxp4Ti8aPqG7sEQYGHBmOfAJiV3/VfFjfW7MNZJde62/tFOoqlsLIG0TyxRT/l3UYX /hbL5b5s3lJYk5mDbXy/GL50Ymxvgkyq0iPv4YRj5O6acugDen4wJ0qVnZF4dZAmCfAb 84Ak7NwGx+rL5Pk9LKENsyaBhZl3lJ8aSV8ot+2NLu2ifUOaeESJGvWDmNMQ4CxHvJkL obFmA1/KDrWz3QArOLPQJ8082PxNeOgZjdle0V/ezwFUtNmkZKGaZjavxAAy9A6iK8k8 FCzezKXYPQNJFc5/SfYBvQb84cEN+p6d1hCdEIiMDooihTGIju6SVHzsh5Zm6TtaNVx5 31/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w8nkOPU+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q195si20587002pgq.119.2019.07.16.14.47.19; Tue, 16 Jul 2019 14:47:40 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=w8nkOPU+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732084AbfGPVqf (ORCPT + 99 others); Tue, 16 Jul 2019 17:46:35 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44737 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728294AbfGPVqf (ORCPT ); Tue, 16 Jul 2019 17:46:35 -0400 Received: by mail-lj1-f195.google.com with SMTP id k18so21474457ljc.11 for ; Tue, 16 Jul 2019 14:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/RAqXRe608t4DMx9FGyKisTh63SKLqBM/Ij+WPbCgPM=; b=w8nkOPU+3uflSrcrXxVEWNs9uhGpDdd+Rzxjc1vZSogoQypeYtVZZXnBAYPYoeQwTk QXylYhCAuTzEveN/SdH0E3tjYsDhtyjvhezP1JjINApaDK6H0Yi17N6btnci60KnTRnv 7RX4plxLZk2v0cncumOcFIrmpLUqJn+4F8v0K3eEGHefnLHMrFASyUd0UGVcTzNozd1a vcogndbzJPjwP1MTJvTWUTAO9gkwTq5N8Sr2X2Fi2XFAPKEg6agIcorsdZPHxNFgGWgf 7HdIu/jAzowkZHNUKuzdFQlzwV3SabCls6H1gs85AuaxjcVSAOo1qHdsEH//0kKtxz1k 8vMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/RAqXRe608t4DMx9FGyKisTh63SKLqBM/Ij+WPbCgPM=; b=GzSJzRBuHRsxAYyU5vb939GAdR9bWt4mhgpn9CN7bRjnhFu5Sx8Bls4BoUIJytKNVR e2SV00CVC012WCfcEy7+LqUnceHcFQDwuSV7Ldwz3+drd+S9RdRIHPA1yKvfu/24jw+U 2RyjcF5et0XY3y8axBspv6oeCogCyZIsUCWv7YGUCWdT97MzZP7nQkH+L+mEqquhnS1h YPzgRRss6c3eo0f/ek75cclb96+5RxV1OCERtKb7Tt8pwhlh5l7NHLN0TeGx72YM2vye WPI/WfWafAR/olhCdgHOvvsHQUOMrHv6kmmNIPZZCl2Xr7Jw2ajRV0T6Dd+6ooFffE5j DNTQ== X-Gm-Message-State: APjAAAVuqEoI9UGTvFDcBeSgJfd+NAphAIvNlC8XVrFd6/tjM2UoWQOF 1roqOvjua9vxl85GAJ0ISHEXnqTOMoynwIAnXw8YLw== X-Received: by 2002:a2e:8195:: with SMTP id e21mr18018479ljg.62.1563313593593; Tue, 16 Jul 2019 14:46:33 -0700 (PDT) MIME-Version: 1.0 References: <20190708082343.30726-1-brgl@bgdev.pl> In-Reply-To: From: Linus Walleij Date: Tue, 16 Jul 2019 23:46:22 +0200 Message-ID: Subject: Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled To: Bartosz Golaszewski Cc: "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Bartosz Golaszewski , "Claus H . Stovgaard" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 9, 2019 at 4:20 PM Bartosz Golaszewski wrote: > wt., 9 lip 2019 o 15:30 Linus Walleij napisa= =C5=82(a): > > I was thinking something like this in the stubs: > > > > gpiod_get[_index]() { > > return POISON; > > } > > > > gpiod_get[_index]_optional() { > > return NULL; > > } > > This is already being done. Ah it is. > > This way all gpiod_get() and optional calls are properly > > handled and the semantic that only _optional calls > > can return NULL is preserved. (Your patch would > > violate this.) > > > > Maybe I'm missing something, but I don't quite see how my patch > violates this behavior. :( I missed that we actually do pass a poison from the strict *get functions, mea culpa. Let's apply this, will you send me a pull request or shall I just try to apply it? Yours, Linus Walleij