From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 4F8E43161BA for ; Tue, 10 Feb 2026 12:28:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770726528; cv=none; b=XCd2bM2i11dOrgmd2AJcKFatY0094Kh8Z4gkgZrDkaIQWife2Cgdj+IyrZTJRk+92zYpvHuNnQWcE+YkqJ8D19oXrZOaQ70q5o908F503pPp3dnINSCBCoYsq3BJBIbkYFk1VhlzuU1nJxIaffe9CvmeLcRMgGwoTjxi/6ByjQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770726528; c=relaxed/simple; bh=IM5CIEHcXz8uQifafBoH+La766oYDFyBVmZkYYbfdfU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GJphcyvOJn2444pu4oCWmKuBw6twDNDVQJzJAD++RBZhRab3lLXyBKCatKGZMY7BVtJlkXauCnZDFIOhaZtRJL6E00qVaM1s7cC+eR4c5eg6ww8Fej2tx3v1ZSrj8Jz73IFj3qN6JTWPQpvjH9722h8ED90VeTb5nJMI17rmQn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=O9c0f3iA; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O9c0f3iA" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-482f2599980so8863545e9.0 for ; Tue, 10 Feb 2026 04:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770726526; x=1771331326; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=v3y5gBsHvKaNLnlT3r2TZg/0DkRwb19baAns59IeVx8=; b=O9c0f3iAyMRM+p84pAIR00C+N27CSHmXNYqoHNksDn8PfN+L4727qlTFbz99XIYPV/ GxPMJ294TWtVAFA1HjK2khTXAzQmm2fkCB1+hgc0PHyS1o75LmbU5b9K6yIcGytWOIT6 MJdgMtV6UttNAN5yitsbKOV/hz01rTbK88DdlJW/xrE0R9ol0PCMQ9l4Q+aph5VyDWAE 1wC+B6EM6pDWz+UrSzLjSRvP+ScDmICrZYhs7r7V6ImWJ2O8TnKSNBlyqsEXPKg7byWl Kp8XAUmhdXeRxIe0i6phnltufvKA0oaKYxtI/VjagCd6sC1TtLLDjF1anr54AM8v1NFO XWLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770726526; x=1771331326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=v3y5gBsHvKaNLnlT3r2TZg/0DkRwb19baAns59IeVx8=; b=kh9FULAoDsLWcQML9uFWYpBXtHKEgfJjy2oSMHnXmycqopIbLiXHVee9aJjTGW+ICK UiwDQQgp1u8L2h8/Brc8JHmbbBerod/Pafwl3FwYeiNek4c02QF8zDZoJZcz+RyQjYjF TX9sKABKx6fZ/8twmPkZi6kPzAbiWpaFd7dv1v+XGrB6OsPtWaSjBuTOM4wfyAPwCt87 MpP9jcaZcQDffTRBV0LJpk/fTNS3RYM9cD7+cEYKcqDANlxotUfxoowoABGv8zF1mnGT ayq/nr5SiSbdqrqATFb0ro8JaBnbKjba5CoLXeU9fHqhTiATbsU8t9jjwAiHk2+R6O4O uoLQ== X-Forwarded-Encrypted: i=1; AJvYcCVEAh7eR4LIXU8nMZvu4jYgPL4bw6kPxTDWRvke8PScOROqTmN1RiIbCDZv9xAMc6E1Q4GPzP+6Fv1xPoI=@vger.kernel.org X-Gm-Message-State: AOJu0YyIOPwJSPFB5hMmfo1Qj7eCWJpZcby3M8jLNd/0+rUhgoZYoqoT /JJDUT5r2SqOX/34TWyTBarM6Pi31/XZg/9PiJUaCSul2TeXz5rHtM/W X-Gm-Gg: AZuq6aIxjrg/5hCWA52yehlepiXBRBrR0dlA7yzgpDIuJb5VeMbKWZPh24tY8QoX1Tj SJNZY3+gtQe0QyNK37xc69JEtQ5cTeHinJl+dXAJy60xy98qLC+Zap6jMToIi2aeTJ09+Ff41ZW Na14D/gkJXRjfEownb9MqSceZc7IyGjQ4kJ5UU2/D7GNJ4dliIA4GAlkEClWq/SuZFR/6OYMWeT 6QMasBv7dujrvc4nOiMWmkbV+0Rkdq2uZ2GMuv1/6xUcF9mC6F0IWMNW77irUNCpHFHcaSV7/rv fH9tKsukM3NO6+V5GFzviz9q5ScTOVAC5h/x5HEeTJx0vf6HZoQAAc94vQpipvEOTb5v9kqyJ0B IMjOCu+k921BEI9mHYN0AQGlijekR7Pbii3zd1I8mDp8YWegrp23nqqTjSwCFMKLP3JRpXFQ8rD GnEj15+x/YIFcIy3J5cJxQE/cCcDyyhoER0SxzsJI8wGR1hcFU26ESVrNWXRyqBqM9+z4ou1R12 QQ= X-Received: by 2002:a05:600c:35d1:b0:480:3a72:524a with SMTP id 5b1f17b1804b1-4832021b572mr197768335e9.19.1770726525357; Tue, 10 Feb 2026 04:28:45 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4834d930902sm48671265e9.15.2026.02.10.04.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 04:28:44 -0800 (PST) Date: Tue, 10 Feb 2026 12:28:43 +0000 From: David Laight To: Dan Carpenter Cc: Yoelvis Oliveros , gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: Re: [PATCH] staging: octeon: type change from uint_t to u Message-ID: <20260210122843.05800774@pumpkin> In-Reply-To: References: <20260210101952.631bf50c@pumpkin> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 10 Feb 2026 13:41:41 +0300 Dan Carpenter wrote: > On Tue, Feb 10, 2026 at 10:19:52AM +0000, David Laight wrote: > > As a separate issue, what is the purpose of all these bit-field structures? > > You can't portably use C bit-fields to map hardware registers or network > > packets. > > It isn't just byte-order, the 'bit order' can differ even for the same > > endianness. > > Huh. I didn't know that. Can you give an example? You probably need to look at one of the old BE ABI. But I've just failed to find a reference to an 'unexpected' bit order. But play with union { u8 one:1; u8 all; } and you find that one has the value 0x80 on BE. There is a note in one of the kernel headers that all the architectures that linux has supported since (at least) 2.6.24 have bit endianess that matches the byte endianess. There are definitely differences if bitfields cross word boundaries. Basically the C language pretty much lets the implementation 'do what it likes', so different architectures can behave differently. ISTR a relatively recent change to gcc WRT the alignment of packed bitfields on x86. David > > regards, > dan carpenter >