Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp526352pxf; Thu, 18 Mar 2021 06:27:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk7Bm1XXZFe7KKThAagYSHFZdric6m7QZk03NSn3eNuRP/U941qROhGIZn/XPlhP0pRuE0 X-Received: by 2002:a17:906:9714:: with SMTP id k20mr40669415ejx.519.1616074042099; Thu, 18 Mar 2021 06:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616074042; cv=none; d=google.com; s=arc-20160816; b=j6UK75YGhw2/ydN02dIik38DJxZeL8CLrQSknyt1wbv4kR5wsYgvDgVFAlL1YTTQM8 l6Pj55w0bdx2ZnwjZTzH46t/uzmZmmRzAU+M1mEPs02thROThZCxC/C9khUhveITDK+4 Cb8dgLZpwrl4u6e4/vgl54T/663UQfLBSbEWgh6NkFm4ZPnOOhp30EuEidYjL429JBsB uLyhmSnqKmdcL+cFaGm8REew/iDwFpUc3LKly6fSXsEtTeJkBgNpYxdpIPZbO4XUHYbf t9dH99/35wJM7SWA1yZzhjeFXrzyjU630ptIID7IWqOtQZ9GymyLvunpYF82LJXIoDc4 ZHtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=+yzpYV2PuSjo1Yjuq8wMOxhg3HpplZQEVSblRcpRalw=; b=S0LtEvaH9Dm3L6MPO926odhlCHkVmumcYxUUe7bOLn6Sdy4LKleryI+90KBXcTZ1im AtAAhjGmGurhJ+w5MjavM5s3woWH0MRLL3w2C1nUfU1E2Mith/4KJKZ3A/MZAp/BKYSO qm1gRkp1aJULzTLcG79RSoHk2SJ9PG0WYGSCBBmXVJ/ahMUFQVZ8w+z2GEpp8do5eZJ0 Mz/15gClLgwuy7xDEwM8FdYq2iITcHLMORYJ5o9grlSxDIuodg4XBiFNIJsGpxUbDua8 hWK9NH5PwaO6g5nyYQTZmuc4udio52ONtPBhebxrbic0v8ImpgkkEbSlDgP25Os6kiba OKFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si1748432edc.150.2021.03.18.06.27.00; Thu, 18 Mar 2021 06:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230032AbhCRN0F (ORCPT + 99 others); Thu, 18 Mar 2021 09:26:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:58680 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbhCRNZq (ORCPT ); Thu, 18 Mar 2021 09:25:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2014EAB8C; Thu, 18 Mar 2021 13:25:45 +0000 (UTC) Date: Thu, 18 Mar 2021 14:25:45 +0100 Message-ID: From: Takashi Iwai To: Colin King Cc: Olivia Mackintosh , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb-audio: Fix unintentional sign extension issue In-Reply-To: <20210318132008.15266-1-colin.king@canonical.com> References: <20210318132008.15266-1-colin.king@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Mar 2021 14:20:08 +0100, Colin King wrote: > > From: Colin Ian King > > The shifting of the u8 integer device by 24 bits to the left will > be promoted to a 32 bit signed int and then sign-extended to a > 64 bit unsigned long. In the event that the top bit of device is > set then all then all the upper 32 bits of the unsigned long will > end up as also being set because of the sign-extension. Fix this > by casting device to an unsigned long before the shift. > > Addresses-Coverity: ("Unintended sign extension") > Fixes: a07df82c7990 ("ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk") > Signed-off-by: Colin Ian King Thanks, applied now. Takashi