From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46167326D51 for ; Thu, 4 Jun 2026 15:26:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780586763; cv=none; b=tfw6Qm9vDN2QxRx9xXhk1T9HK56BASMmJ8DmciBN2pfaAr/71p++Wi2qswtLEmmzQRtlCphGRArBfXkJKI4g2a0AMGkYCUyM15JQ7hmCXbjjNBoo/Xkrvw+3w57YYZVPfgiAuOIWzl9MegUtmQurMQU70XuGEtwGFaErcoAfIMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780586763; c=relaxed/simple; bh=2kNIHrXh8KMv3Lhe0vW9iB5lvOIdY6mGj4BWaPTEkp8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TL1Sjgid2ODtxOLDZU+YW04x6HXDdIhLdeFKcoxwKP/Xf7Seunr8SXCnKa3FSDMHb0cLq/WB8ReqrkaDAbpjA4jHlS7149AX13vazjAurRw6Yj6kpqMmapm481qVfl7o9anScmiWaRdii3PomRG4EV8ygyFvWbHxoRSN5NiwRGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=u77s7L9l; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="u77s7L9l" Date: Thu, 4 Jun 2026 17:25:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780586760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NWfW0hKJr7V2QHw5t2GqWFv/XZ92T8o2+LvBF+8aRiQ=; b=u77s7L9lvDcDngWoCERRvAK3Aq4diy97hg0nomLMQ3iC49BY78r3gj0FTkVsaGowxEwFkK QImcgY+Cs49udcGD0eE/38RSMGT2aoX5Ivq+gQ8k75uFPV/5LrmyMLMSlwRZCpVjzAmo6R iUmEo1tdchC8aPc3LBxRJEnIh7dgzGE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Thorsten Blum To: Alexander Shishkin , Maxime Coquelin , Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] stm class: remove unnecessary local variable in stm_write Message-ID: References: <20260508144705.3940-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260508144705.3940-3-thorsten.blum@linux.dev> X-Migadu-Flow: FLOW_OUT Gentle ping? On Fri, May 08, 2026 at 04:47:06PM +0200, Thorsten Blum wrote: > The local error variable and the corresponding if check in stm_write() > are unnecessary. Remove them. > > Signed-off-by: Thorsten Blum > --- > drivers/hwtracing/stm/core.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c > index f48c6a8a0654..edf3d69a84a9 100644 > --- a/drivers/hwtracing/stm/core.c > +++ b/drivers/hwtracing/stm/core.c > @@ -602,17 +602,11 @@ static ssize_t notrace > stm_write(struct stm_device *stm, struct stm_output *output, > unsigned int chan, const char *buf, size_t count, struct stm_source_data *source) > { > - int err; > - > /* stm->pdrv is serialized against policy_mutex */ > if (!stm->pdrv) > return -ENODEV; > > - err = stm->pdrv->write(stm->data, output, chan, buf, count, source); > - if (err < 0) > - return err; > - > - return err; > + return stm->pdrv->write(stm->data, output, chan, buf, count, source); > } > > static ssize_t stm_char_write(struct file *file, const char __user *buf,