From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 D038B38B7C2 for ; Wed, 14 Jan 2026 10:32:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768386743; cv=none; b=Hsow42l0G04JFRciA+abRwIUgYYvNuu+Bz+0OaGT7cYaXLzjq0WeqTLkKHLT1RCQqh2gjnyIc+mNrhuggfie9fIuVHi1+ochke+NquFLqDOD8zH8d06KVZm4chjGT/OFZ7lqPcyllsN6pAjzPtD34GWT6SH9WTs8R/4eoNfEj7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768386743; c=relaxed/simple; bh=W+H7LaUItn+O8h7nltWmZw4U51/nO+X1Uik2s44Bl/g=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=M/nsaUezk1VV8kvWnDARW8/+MXNxfzT6N1yLBjPmKiD6YMniCfixdugY8KTVUwUsDK5WGdLn/WOhZg5enNuwNOTVREsAaN0iKIk8OBrB4/G3haUxNmvTb1DsCr66f/9lizJD9MT/sKG7QU4v0BXYmvr9T1dsMVfDTbFQenNk8IU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=RinrFQgW; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RinrFQgW" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-59b77f2e43aso886755e87.1 for ; Wed, 14 Jan 2026 02:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1768386736; x=1768991536; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=0V3SJPMaPQlOjzTXbwuEiynKNowzifQW9CArs1owkpI=; b=RinrFQgWizioj56gxwbEKmq8fmq75MyZcWuORyJZaY3uH5l820pD0TZSv5Ss1wyH3K 4h7XmjoQY5j8fIfvO5g91bgynSIMpUJKplQ2YLwdf90EkLKP25Jsw/4HGBSdmS4+qj72 SOgUXtbcAK8XQKsg5mVNBtD1VwEGu42BPMj0A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768386736; x=1768991536; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0V3SJPMaPQlOjzTXbwuEiynKNowzifQW9CArs1owkpI=; b=Pl/Wheny7uOLOlWd+Q7KtKrEZdGxjcjju6Bf1zZxrr8vFNHiGy/3TmS9V7WaCL/wVB JZEu3sB+5eA4cC9cD7DF1d1wNhcKm4LqEQHVzHX96eHvih71kfEG+PiG7Ar9l2URzFzE drheWX0L8OduGBGIXo1Hia05redQIt7KlaSyIwU4mAtBZYyU39n94hbtnh/NRRMKJOBq SIEwyXe2FmAujr04eNJcZ9OstdtadlMM479wwJq3+WFkuZoZMjHPqo8LMKlsbAugoQpS qnwSIRIGyy8SZpwn2X4uIqcBKKErj+yt4YSdJQS9DHiRhsezALKJBwuZQYQCvMvd+0K2 tDeA== X-Forwarded-Encrypted: i=1; AJvYcCWc8kvsZ6tKbntEes2unGj+IU6rgJloft+U2AjPnabfR/BKH4+K9CUUYJVSAY/KN8qYEHgQrIp9FemyRPM=@vger.kernel.org X-Gm-Message-State: AOJu0YyRtU8pQnBVaZFqKTAd7+NXY5cwuTncsfAME4UGka9N8t75Vote DVyQuLX1mISY6CiNE0eIvrSSc6vlX/xzxNi4s/mKxvwN75sASKn23W/c83pepuO5fw== X-Gm-Gg: AY/fxX610ys+l03rchjeGp15ULrz6xRllwfh5GFrRwNrzU0IPyCYnK1M7HRi52bigkQ 0lgku5ZV9smRHVX8n8unNokHIUCmd2O+HUAEZSjs75klCfBBwnjxrdZeeCkCxyXg+dfRv83+zSP PAKyrsmcNq1XEXY4fAkzTGu9+6X0HgLrEFwxRgEmr22kKXLzWoN8XwfruqSZ/xH38p+KPr4fw3+ 3Cv7fc7aHJwMtZeRRQDPhxNqZfCo4aCIoHCZukiPeo0V4OZBfwCGoHMnKIxlN2AbKqnrZ0K7TFt 83SCpO66tYGtV/lxYb8H0VwHPmc9IGrrFd0E4z9+b/hoYnZvUmksgE9Lg16u5nI7cEI8+spPoCN A8JPY849xe0P3GWFCk215TFTiE/NAyG+qzK0PP1kTEEi8Q8xqNFvpuhyUlp3OFzRftB5sfDxMt+ GAIQ+nM/qUP7BY4rZWQr+eJ1QLR63rW5HxvneYM446eqM6ZmK29HjFgUAic+r8U5wEyptV+Q== X-Received: by 2002:a05:6512:402a:b0:59b:834d:fddf with SMTP id 2adb3069b0e04-59ba0e949b4mr739713e87.11.1768386735583; Wed, 14 Jan 2026 02:32:15 -0800 (PST) Received: from ribalda.c.googlers.com (181.105.228.35.bc.googleusercontent.com. [35.228.105.181]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59ba10411e5sm573981e87.61.2026.01.14.02.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 02:32:14 -0800 (PST) From: Ricardo Ribalda Subject: [PATCH 0/3] media: uvcvideo: Fix allocation for small frame sizes Date: Wed, 14 Jan 2026 10:32:12 +0000 Message-Id: <20260114-uvc-alloc-urb-v1-0-cedf3fb66711@chromium.org> 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="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAKxwZ2kC/x3MQQqAIBBA0avIrBtwJAy6SrQwnWpAKhQliO6et HyL/x/InIQzjOqBxFWynEcDdQr87o6NUUIzGG2sJuqxVI8uxtNjSQsGctpbGkhbB625Eq9y/79 pft8Pt1GqpF8AAAA= X-Change-ID: 20260114-uvc-alloc-urb-d1a0c617106a To: Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab , Johannes Berg Cc: Laurent Pinchart , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Ribalda , Itay Chamiel X-Mailer: b4 0.14.2 This set fixes a bug in uvc_alloc_urb_buffers() and two more style patches. The first patch was Reported by Itay, who asked if I could prepare and send the patch on his behalf. Signed-off-by: Ricardo Ribalda --- Ricardo Ribalda (3): media: uvcvideo: Fix allocation for small frame sizes media: uvcvideo: Pass allocation size directly to uvc_alloc_urb_buffer media: uvcvideo: use min() for npacket calculation drivers/media/usb/uvc/uvc_video.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) --- base-commit: 17526c7e69d07395e9d39794aacba42dcb02ff49 change-id: 20260114-uvc-alloc-urb-d1a0c617106a Best regards, -- Ricardo Ribalda