From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 91F491A5BB5 for ; Wed, 16 Apr 2025 13:18:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744809512; cv=none; b=pp5JFwPIDDmuOSpTWZbeXgGbC16eREIhXbjW7F/Mmboa5wcGv1RQBg3nah09rSQi8orxgvJvFLMQJ1blDiDOeyi2ECTymau6G+T0k0BqRkr6qVs2lOUWB4730uYeQRPs7nxeEIm8qnoIFYTkI+4p+gIqqjezJlPwyXeqSpm6+fw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744809512; c=relaxed/simple; bh=40MZITXjlno7tjCb4AHyz9gkWr5g4kZZoOXV6Xt6QLI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uGD5CU3Reu5+V0WYoRx9HPY5c8gx81C+DWEyaSwzVm/xLRtp6S75foY921b/0TUknE3+wvMTm4edzcPmpdV24LhKxhS+f9zDWrb9oJLyvRyQ2X6CHbQop5xNOvoIn6QZllEJ4SD3O1/v75s/yLB2UIt5jGgXvCHsnn17E3zOq4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=Ws0CLdWG; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ws0CLdWG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744809509; 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=KYYwLTuVZAD8yB0aza7qR8SAg9Lr+TNGrhR+c2xdSYI=; b=Ws0CLdWGrUyJkbB0xg5i3ZslKsr4a0Xjfc9vSGXrmKV5rXueEgFSnZcJ57NB4HrgsTPthH acTrq2jovv7XJrMb1oRyS0qR77FdWEciS/WhdxZcQ6DC5XLvKOOTpzN7peoyAC98vd42cj jmOdFjRPErN6v9ZJvLKoTNLvq1uq+LM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-94-nvkQ3o0JNjOkLv1ZmZ4cAg-1; Wed, 16 Apr 2025 09:18:28 -0400 X-MC-Unique: nvkQ3o0JNjOkLv1ZmZ4cAg-1 X-Mimecast-MFC-AGG-ID: nvkQ3o0JNjOkLv1ZmZ4cAg_1744809507 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43cf5196c25so41242485e9.0 for ; Wed, 16 Apr 2025 06:18:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744809507; x=1745414307; 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=KYYwLTuVZAD8yB0aza7qR8SAg9Lr+TNGrhR+c2xdSYI=; b=X25JxivtGNUJiftrqnPKNR5+qkVa7/uu/N0x5f+BTTm0MZEzak3TitSmglz3QQAwa4 A78DLSfJq2dmihCBbZHCdbtMSOJhh0JYnh58DftTILVNcVm5p0hC4SR74DL58gpwtwSy 0BntwKLFpW4cOCIPx9QnOK+DrMjz/MMojYk6b54DJ5NkrW1ySU5n8wVFBqinwwpChlmE xe8UdduOamb6HtTQpirqi106ZO/8RqPkc2MGFS6QXlnuSdeHlO/TmbxsLASVWu7NHuud PDjNKXD/T6NoIj9CkKNQNcvlIz9aMMI5UU+BV+G5FT93Pya0vFtQas5RXtWJOZewYuoO lELA== X-Forwarded-Encrypted: i=1; AJvYcCVn2w4/QTFjUQpOdAjo9cLFH+kN0bpMIr9Ph5YtxtgLDuYyD3pf3JMAfsIxe5kl/t1chHEH/QDnILovQXhhuA==@vger.kernel.org X-Gm-Message-State: AOJu0Yx0KKdeQc16VSYU5U7gwRi+JDml85HHc/A2ngWcnB+9xOohtGGv 1X29NP/NIJyvuGZbRB5ubpY0rBn3kgYKfN5HxuPoaIZxYv12ASh/eMPeOHK+1dtA9f+kcGiQSmG 2GGp1U9hLXt9fmA5cWQHrzbKDC7AxmCQ1EdBJbrxcWhqN3DT22qyYbXXGtA+w8Rik X-Gm-Gg: ASbGncsR8IsU/voRCzuFxijHDW5Qd7krcdqXjw7cUhEINrVAi3clxE4s19OdEfZHNmh JsNDR9vTJuIysy5oH8Jw/6MFVdZjCvP3yKl3w/mpydbEFe7zUhyhYhLuPoDOSNnY3dxmntbx4nt w3lrIP4qeMZFEeexVpsiSBnUBag+o/ZBEmFSK11+gnqED5hBklE/g0O4xCz/5Ot78p23jRXcpE8 6YfqjkAyivOT6BGdvoNwLXJf6YouIKpwQgV0QgP/dSDN2GCO6T43wJmCPj9b4akf/DG3IMvaFW5 AOqmCsFooxKqZn4lt5GTo3IjutZ+PZebXD2u/H7KmIJpnVaQ4jw= X-Received: by 2002:a05:600c:1d2a:b0:43d:36c:f24 with SMTP id 5b1f17b1804b1-4405d61ca24mr19761435e9.13.1744809506785; Wed, 16 Apr 2025 06:18:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwLxrssU1ldVAsWqYITreGih0SWn1/lrOXhFExpzdKQmsh4xxqB+dzhCbmzH3Ij6WFE80fmA== X-Received: by 2002:a05:600c:1d2a:b0:43d:36c:f24 with SMTP id 5b1f17b1804b1-4405d61ca24mr19760785e9.13.1744809506096; Wed, 16 Apr 2025 06:18:26 -0700 (PDT) Received: from ?IPV6:2a01:e0a:c:37e0:ced3:55bd:f454:e722? ([2a01:e0a:c:37e0:ced3:55bd:f454:e722]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4405b4c8378sm21587785e9.6.2025.04.16.06.18.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Apr 2025 06:18:25 -0700 (PDT) Message-ID: <7e54be7d-9c67-45ad-819c-fba6d2da16fc@redhat.com> Date: Wed, 16 Apr 2025 15:18:24 +0200 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/panic: use `///` for private items too To: Miguel Ojeda , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Alex Gaynor Cc: dri-devel@lists.freedesktop.org, Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev References: <20250416122106.2554208-1-ojeda@kernel.org> From: Jocelyn Falempe In-Reply-To: <20250416122106.2554208-1-ojeda@kernel.org> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 993a6twg-Dd60LNv2V9AZGGKL0YwrEHSbBc9jRQk7tc_1744809507 X-Mimecast-Originator: redhat.com Content-Language: en-US, fr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 16/04/2025 14:21, Miguel Ojeda wrote: > `///` should still be used for private items [1]. Some of the items in > this file do so already, so do it for a few other clear candidates in > the file. Thanks, it looks good to me. As it's only comments, I think it's not worth to mark it as a fix, and to backport it to older releases. I plan to push it to drm-misc-next tomorrow. Reviewed-by: Jocelyn Falempe Best regards, -- Jocelyn > > Link: https://lore.kernel.org/rust-for-linux/20250416112454.2503872-1-ojeda@kernel.org/ [1] > Signed-off-by: Miguel Ojeda > --- > Not sure if you would consider it a fix, but please feel free to add Fixes: etc. > if so. Thanks! > > drivers/gpu/drm/drm_panic_qr.rs | 29 +++++++++++++++-------------- > 1 file changed, 15 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs > index f2a99681b998..642e3240a014 100644 > --- a/drivers/gpu/drm/drm_panic_qr.rs > +++ b/drivers/gpu/drm/drm_panic_qr.rs > @@ -315,7 +315,7 @@ fn get_header(&self) -> (u16, usize) { > } > } > > - // Returns the size of the length field in bits, depending on QR Version. > + /// Returns the size of the length field in bits, depending on QR Version. > fn length_bits_count(&self, version: Version) -> usize { > let Version(v) = version; > match self { > @@ -331,7 +331,7 @@ fn length_bits_count(&self, version: Version) -> usize { > } > } > > - // Number of characters in the segment. > + /// Number of characters in the segment. > fn character_count(&self) -> usize { > match self { > Segment::Binary(data) => data.len(), > @@ -569,8 +569,8 @@ struct EncodedMsgIterator<'a> { > impl Iterator for EncodedMsgIterator<'_> { > type Item = u8; > > - // Send the bytes in interleaved mode, first byte of first block of group1, > - // then first byte of second block of group1, ... > + /// Send the bytes in interleaved mode, first byte of first block of group1, > + /// then first byte of second block of group1, ... > fn next(&mut self) -> Option { > let em = self.em; > let blocks = em.g1_blocks + em.g2_blocks; > @@ -638,7 +638,7 @@ fn clear(&mut self) { > self.data.fill(0); > } > > - // Set pixel to light color. > + /// Set pixel to light color. > fn set(&mut self, x: u8, y: u8) { > let off = y as usize * self.stride as usize + x as usize / 8; > let mut v = self.data[off]; > @@ -646,13 +646,13 @@ fn set(&mut self, x: u8, y: u8) { > self.data[off] = v; > } > > - // Invert a module color. > + /// Invert a module color. > fn xor(&mut self, x: u8, y: u8) { > let off = y as usize * self.stride as usize + x as usize / 8; > self.data[off] ^= 0x80 >> (x % 8); > } > > - // Draw a light square at (x, y) top left corner. > + /// Draw a light square at (x, y) top left corner. > fn draw_square(&mut self, x: u8, y: u8, size: u8) { > for k in 0..size { > self.set(x + k, y); > @@ -784,7 +784,7 @@ fn is_version_info(&self, x: u8, y: u8) -> bool { > vinfo != 0 && ((x >= pos && x < pos + 3 && y < 6) || (y >= pos && y < pos + 3 && x < 6)) > } > > - // Returns true if the module is reserved (Not usable for data and EC). > + /// Returns true if the module is reserved (Not usable for data and EC). > fn is_reserved(&self, x: u8, y: u8) -> bool { > self.is_alignment(x, y) > || self.is_finder(x, y) > @@ -793,13 +793,14 @@ fn is_reserved(&self, x: u8, y: u8) -> bool { > || self.is_version_info(x, y) > } > > - // Last module to draw, at bottom left corner. > + /// Last module to draw, at bottom left corner. > fn is_last(&self, x: u8, y: u8) -> bool { > x == 0 && y == self.width - 1 > } > > - // Move to the next module according to QR code order. > - // From bottom right corner, to bottom left corner. > + /// Move to the next module according to QR code order. > + /// > + /// From bottom right corner, to bottom left corner. > fn next(&self, x: u8, y: u8) -> (u8, u8) { > let x_adj = if x <= 6 { x + 1 } else { x }; > let column_type = (self.width - x_adj) % 4; > @@ -812,7 +813,7 @@ fn next(&self, x: u8, y: u8) -> (u8, u8) { > } > } > > - // Find next module that can hold data. > + /// Find next module that can hold data. > fn next_available(&self, x: u8, y: u8) -> (u8, u8) { > let (mut x, mut y) = self.next(x, y); > while self.is_reserved(x, y) && !self.is_last(x, y) { > @@ -841,7 +842,7 @@ fn draw_data(&mut self, data: impl Iterator) { > } > } > > - // Apply checkerboard mask to all non-reserved modules. > + /// Apply checkerboard mask to all non-reserved modules. > fn apply_mask(&mut self) { > for x in 0..self.width { > for y in 0..self.width { > @@ -852,7 +853,7 @@ fn apply_mask(&mut self) { > } > } > > - // Draw the QR code with the provided data iterator. > + /// Draw the QR code with the provided data iterator. > fn draw_all(&mut self, data: impl Iterator) { > // First clear the table, as it may have already some data. > self.clear(); > > base-commit: 8ffd015db85fea3e15a77027fda6c02ced4d2444 > -- > 2.49.0 >