Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp298116rdb; Sun, 14 Jan 2024 18:28:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFybzXby6rfz2c+KxwtHY+ts8RKUotFaESz2odMedSCZmc3QaCkkM8cM2yejRfc5n+jY8xW X-Received: by 2002:a54:4399:0:b0:3bd:62f4:3c7 with SMTP id u25-20020a544399000000b003bd62f403c7mr6200072oiv.88.1705285714747; Sun, 14 Jan 2024 18:28:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705285714; cv=none; d=google.com; s=arc-20160816; b=dVQRPrG0GEQiKasksyDcZtdPes8PJVSS5/cwr2oUfSSx7jPsQtXDKsyHo70J+UCppE I1N7NRLAWpV3I94sCtvuZOpfga3w8rrGCnUVr7whDq3225s2MKv9sZ1Drhd9c3hP04c7 IKt3lwsTQRS8OvDek6PqJGsK+bbsO0bc048kzJ0HD2vp5DRAClVt+JueeREqN7vrasXM QmarZLC9rZABaKf7M/HkLC74KTbzffIDxfI/B3JxXD64Ut6S+Dm6a4gJ6px2MOtbaTcd 19DjTNj/KOvPYnDnNmBoMvhHZgiOeAarAewHSX8AyJeqJlXS4WpO3sB0najRq9XQCf44 uKFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=xbO/6R5kltvyODHpeojPP+raK5bWMfuDOfTQWpU+D/A=; fh=TAeIvacqXx2flzGwt5HYX0uaAiyNX+HcYjz1tS5OoV8=; b=bFbaSnlKyIuH/qV6VHMSxR+aY7ScIUvlsp09gATrfRFTMzbzzPqiQzgS10317RUgLd m+gSkziULtlxW5pR92xiAQP7vHsJJrFc1yF5wCSp0oXE+00f2gljX3bxjmyTDLth8Bzo kbfecnsSXh8ceAffxug145uQoAQOYyYvNmOvuevCpRJME6T9PDD8hxn7zQKusNC+Pj3X ubFV9odH+tswQMkh4Tidb0GZbbj9xKABPLr3dvR/9w2m5eQGdHVZO3Peb9DABAo2lloe EMv9lwgLAtBfZwcW8moFfmgFAkOAkdbPXdrEeSaGwc7zn0rUIiZr3um+9obh4rLGGW/y 0gkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20230601.gappssmtp.com header.s=20230601 header.b="OMJv4g/2"; spf=pass (google.com: domain of linux-kernel+bounces-25592-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25592-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x6-20020a056a00188600b006db1136b362si8165471pfh.33.2024.01.14.18.28.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 18:28:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25592-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@cogentembedded-com.20230601.gappssmtp.com header.s=20230601 header.b="OMJv4g/2"; spf=pass (google.com: domain of linux-kernel+bounces-25592-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25592-linux.lists.archive=gmail.com@vger.kernel.org" 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 5C6252815F4 for ; Mon, 15 Jan 2024 02:28:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA4921FB9; Mon, 15 Jan 2024 02:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cogentembedded-com.20230601.gappssmtp.com header.i=@cogentembedded-com.20230601.gappssmtp.com header.b="OMJv4g/2" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65C3817CD for ; Mon, 15 Jan 2024 02:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cogentembedded.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cogentembedded.com Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-50eaaf2c7deso9243402e87.2 for ; Sun, 14 Jan 2024 18:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20230601.gappssmtp.com; s=20230601; t=1705285695; x=1705890495; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=xbO/6R5kltvyODHpeojPP+raK5bWMfuDOfTQWpU+D/A=; b=OMJv4g/2+3ZL1NfIB5SnF0X7hclFOSXyx6ejJZGTjRcO+ZWxeub4gMEA00ADE4VRZx 5CWtdC/3hjvmNwvrsO13qzH1h84mvLFC2U4h54M+CLmGXQLjNS6VILIqJ/Ts11XFtjuj Rp5q3GMcKjoBpPQlkDxckMDgMF6XycNwlwQrcL4mGn434uBWsVQFQK77eA6OgyknacvP nEKP9owJ+kiWv1EB199kCo9cWB4LjzyORKpCRbdJ2ZXg1+wtLrqcZw3ooPmXcVO9LUWc pEP9qftCJNk9/QiGXxPB6WVpT0t2KZDjzXtGD4p10zt4LQXTo8ka3kcTM6VzWQzeM5+h ae5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705285695; x=1705890495; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xbO/6R5kltvyODHpeojPP+raK5bWMfuDOfTQWpU+D/A=; b=ErycnQnkyKUoRUe4OkKvLds/PBk1j2LPoA5KeLyZBvBAugPAlcUITKFZcSbB0Eo53n q5geCnjy1fOOWHk4BmZ3FpcMQaOGPNnE4H+QYu0N8CL2CCkyL4ckmVnn8Dq2JZOcF3mM CTIN2q1U5XKu5nWz25UWXVgrSaWNcF0GCT5sh62Cmcfiv1X5EPSaUFLZbsY1oRUhq6YA +gMz7KJrXT3ph61YXY6cLqPxWfLnrHDLfggfMn4ruPKUlTAwrOz/VdG9xToOhROGTHwn Bb1ceHnOTOhQ7jI8HfXx7Wv+/rKoeQSJrgCse5RDYDWecRA2aUy0lN6dxP4LuSlM3uiK b6Dg== X-Gm-Message-State: AOJu0Yw9ezMDi7erq+pCFtYYU/lDa6W1zyRCofbsGEWOUGlUlGutWUjX J0IPb6fnTLEl33Ih+g5q1oqk7fbm9tV3Ew== X-Received: by 2002:a05:6512:360d:b0:50e:2167:b306 with SMTP id f13-20020a056512360d00b0050e2167b306mr1792437lfs.40.1705285695248; Sun, 14 Jan 2024 18:28:15 -0800 (PST) Received: from [192.168.0.104] ([91.231.66.25]) by smtp.gmail.com with ESMTPSA id z7-20020ac24187000000b0050e758ee006sm1309563lfh.205.2024.01.14.18.28.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Jan 2024 18:28:14 -0800 (PST) Message-ID: <0f9e73a2-075a-4a4d-9c74-de17d135567d@cogentembedded.com> Date: Mon, 15 Jan 2024 08:28:12 +0600 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] net: ravb: Fix wrong dma_unmap_single() calls in ring unmapping Content-Language: en-US, ru-RU To: Sergey Shtylyov , "David S. Miller" , Jakub Kicinski , Paolo Abeni Cc: Claudiu Beznea , Yoshihiro Shimoda , Wolfram Sang , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240113044721.481131-1-nikita.yoush@cogentembedded.com> From: Nikita Yushchenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit >> + if (le16_to_cpu(desc->ds_cc) != 0) > > It's not that != 0 or le16_to_cpu() are necessary here but we're on > the little-endian platforms anyways... Let's leave optimizing this out to compiler. In the code, I'd vote for always having explicit conversion operation when reading __le16 value from memory. Nikita