Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2735415lqz; Wed, 3 Apr 2024 07:12:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4vEVBOHZmknVdyZD3Z+Ra8s53appw3UIXm4HY+UIv7Wu2L6UCX07wgjlOV8Ji1r8JHgu6w169MKvaZRrwVoZMaAp21bjGZlRdMAMQ/w== X-Google-Smtp-Source: AGHT+IETYkVJ+CS+TUIhULvzqu+iGnwpUL4zbL9rqPDQMwgndOSi2ekZpB0y7tluhGXUySRhN0rg X-Received: by 2002:a05:6e02:1a4d:b0:368:97a5:13e8 with SMTP id u13-20020a056e021a4d00b0036897a513e8mr3051427ilv.27.1712153566731; Wed, 03 Apr 2024 07:12:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712153566; cv=pass; d=google.com; s=arc-20160816; b=do9Rq9VLN/AEBAmVsk3HqYpXUgsKBROvvDfh0+LlOoqNvHMm8IsbOuq/AnC3SyPYg0 4msGSES/5dtcG33192JiXpxN3yKlsP0w4DvHcMEj2IWRCY9hmZxeJQBO93mPaNlXHQ4R acELfuabj4BxNLC0gaddlK9DptYMFOveQx2nFMDAptQXOs9B7dsepIQa8c5efYcILevW ZgdfWJ9F8H8O5A+V6LP9O13gH6sXo2tesIut0G1301fSHCaDZQ2rW0tTWUMxNYCNYp9W SgoBgy4qK7SRB1upJQ6gnUexOjZ6RfOXOSICWs09CLfL0QsQf0ukVGzYnEbcz1mv+5t4 jPIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=2dbCAJSaH9jFId+0gZzIqDck5z9baO02AHMcYssDIEM=; fh=MGbvQDSGT7E1kH/jsFbSurnrIRYhL1LGLDLCPYmhs+U=; b=hEo5f4nUuAohnV+M2U5DZ4HMws/wtTaCtOysFNyWcpHw/W+iCqeimTdXQDisgh0ENv ufgSGG4tWqXL5IJ54tj3XV3JJQgKST6Xs68jmqlwPSEFd8zMYp7gwbu5J3yCuQULVHvg dCVKHJDUG3qSxxBSOP/gVPf4AV+kDSPUdmAaPQXJGJoCII9VEk2iUrR6Q6tb/O3w/6GF 4madfqXHd3Sf4svmVryYeS/xuakU1F8Ffd98KfZ1VhAY7yXCpvV+d7znmaSqTMUEdcDw R5UiB+x2Y4D0lTso01JzFLVR806okND7O17xkfHbPA45Ekb9McQ3g+kdwj2Xfnx/asr3 2BIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IyJL8Y5f; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-129916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q14-20020a656a8e000000b005f3d54f00desi2272480pgu.740.2024.04.03.07.12.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 07:12:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IyJL8Y5f; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-129916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 05A7728C1A5 for ; Wed, 3 Apr 2024 14:10:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E9FF1494D3; Wed, 3 Apr 2024 14:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IyJL8Y5f" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 E2A2A1494BB for ; Wed, 3 Apr 2024 14:09:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712153391; cv=none; b=V0HRq3CNjS8EeGe7S9fc+dTFVoskQzNGsdjIZnI06V5jrLT1Ga+0y7zmnZwAvcP7jkylR6F5UN/s1x+tgTPr089VB7wEMJ6VlmMN8CqqP1vLcJJLitm8e5395Q/PHaVh7HUnlzAJBrejK0cfwvL+HDXes5vDN0n9xNBeb53slQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712153391; c=relaxed/simple; bh=uaBB+wQsNV6UWh9EWCIicCJ/cZxkRwz+9E3hPzTRRxE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cYsriW8GJg97mNED9E2OFDMRiLkDNXXi3ijfKlrwdK+W1gof5XDohlJNotJ+bpUflr2KBWcgX6ASn2cEZt8SAzoHbrr/4m1U0wDJmvsyELuPWA1AaPs2fhWzZoIn/LzmtXnbD7IiQYbktZ8DDkJbSe7rrNUMuXvBEHdKrNGeCWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IyJL8Y5f; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712153387; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2dbCAJSaH9jFId+0gZzIqDck5z9baO02AHMcYssDIEM=; b=IyJL8Y5fm1JzQ0EnLxXFdeJEsUWJ/7M7gcCuJW9WGNcap55omrMLIsNOOyxaj5uB8nKZxd YfXCMMlpXAcQjLU/yK61bqIPYA5WUEBGcgZURxfksrMjdEGG/4OfJFCtLgBz6N5dWIR24a +20zVrsL+TcIx4dkZu0sA4iD3dMIVi8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-0UGiGv-bOpSnUxvxodB8sA-1; Wed, 03 Apr 2024 10:09:45 -0400 X-MC-Unique: 0UGiGv-bOpSnUxvxodB8sA-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-56c1b114528so1932586a12.0 for ; Wed, 03 Apr 2024 07:09:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712153383; x=1712758183; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2dbCAJSaH9jFId+0gZzIqDck5z9baO02AHMcYssDIEM=; b=pqKaGBtpV9PG9ccla9kUrDClfQLsXgF/Qt/bNZHzxJt3y8Ba8q1zGfUxuzKZ21JN+v TOdVgC3272Sak6GHpn8q4vDgykmBayN3sDBcFN++U2QnFDLDg5VNsUyH57sZJFuj7Gl2 s7jso4tyWtrzd4HAkCfoIY9zrZFpY6j5tNyTD9gc20S5dgnJgRQljK2vaM/W/rwQtbcr ntsV9eQS62hAzvTQfE708hQZThTGT0PQzGao7+5O0B+9DJSj8LcMTMAOrqTF/7KPX54t um1WjpYEJl41UsNG0N3iEXFvkKeG96cagLVtX4/KKZeMydRxfmV49TossWRSIIVUl7cj Z8Xw== X-Forwarded-Encrypted: i=1; AJvYcCXg441qo3izCMQHl2+Yro9OkphfSKd/haz2f1qegH/bZa1zvPUfTu1VJeV+0NgUCS/ozGKhAxPNQonvbfOy822aQT4BB9I55XdxicHw X-Gm-Message-State: AOJu0YyhpXLVawqDJZNM0G2+wgIPUFvUjmMvWUF7oNtuhaovt/GaI1iR zwZ+Y1G0eO9SSxnfmjHwv5nGkryzdywZHhNyzAvSf8bd0W7rskSGN05M83dVHwjAF5s6oM43Vtf Z0V9KfiAaCFJLe0ArnK9ohaXIlvHlfXXCT2HU+fycp1s50WWAf+izxBN+yY65oHleyYk27w== X-Received: by 2002:a05:6402:518f:b0:566:ca0:4a91 with SMTP id q15-20020a056402518f00b005660ca04a91mr12828056edd.2.1712153381708; Wed, 03 Apr 2024 07:09:41 -0700 (PDT) X-Received: by 2002:a05:6402:518f:b0:566:ca0:4a91 with SMTP id q15-20020a056402518f00b005660ca04a91mr12828043edd.2.1712153381364; Wed, 03 Apr 2024 07:09:41 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id r17-20020a056402019100b0056c4a0ccaacsm8024402edv.83.2024.04.03.07.09.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 07:09:40 -0700 (PDT) Message-ID: <7591adba-0603-4843-b228-a0bf20fd116f@redhat.com> Date: Wed, 3 Apr 2024 16:09:40 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH][next] vboxsf: remove redundant variable out_len To: Colin Ian King , linux-fsdevel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240229225138.351909-1-colin.i.king@gmail.com> Content-Language: en-US, nl From: Hans de Goede In-Reply-To: <20240229225138.351909-1-colin.i.king@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, On 2/29/24 11:51 PM, Colin Ian King wrote: > The variable out_len is being used to accumulate the number of > bytes but it is not being used for any other purpose. The variable > is redundant and can be removed. > > Cleans up clang scan build warning: > fs/vboxsf/utils.c:443:9: warning: variable 'out_len' set but not > used [-Wunused-but-set-variable] > > Signed-off-by: Colin Ian King Thanks, patch looks good to me: Reviewed-by: Hans de Goede I have added this to my local vboxsf branch now and I'll send out a pull-request with this and a couple of other vboxsf fixes soon. Regards, Hans > --- > fs/vboxsf/utils.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/fs/vboxsf/utils.c b/fs/vboxsf/utils.c > index 72ac9320e6a3..9515bbf0b54c 100644 > --- a/fs/vboxsf/utils.c > +++ b/fs/vboxsf/utils.c > @@ -440,7 +440,6 @@ int vboxsf_nlscpy(struct vboxsf_sbi *sbi, char *name, size_t name_bound_len, > { > const char *in; > char *out; > - size_t out_len; > size_t out_bound_len; > size_t in_bound_len; > > @@ -448,7 +447,6 @@ int vboxsf_nlscpy(struct vboxsf_sbi *sbi, char *name, size_t name_bound_len, > in_bound_len = utf8_len; > > out = name; > - out_len = 0; > /* Reserve space for terminating 0 */ > out_bound_len = name_bound_len - 1; > > @@ -469,7 +467,6 @@ int vboxsf_nlscpy(struct vboxsf_sbi *sbi, char *name, size_t name_bound_len, > > out += nb; > out_bound_len -= nb; > - out_len += nb; > } > > *out = 0;