From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 075C0C4320A for ; Wed, 1 Sep 2021 18:33:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D78456108B for ; Wed, 1 Sep 2021 18:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245179AbhIASeW (ORCPT ); Wed, 1 Sep 2021 14:34:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbhIASeV (ORCPT ); Wed, 1 Sep 2021 14:34:21 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 958CBC061575 for ; Wed, 1 Sep 2021 11:33:24 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id s12so731324ljg.0 for ; Wed, 01 Sep 2021 11:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wmlFp7IyZjhJM+UbKugZxR7EIWg6Bz16CqvqAdC73iw=; b=aO3JVvdoC0SVDHw81BnqPRgF6kxIUydorxW6tTvTFB4MtXnxf1a0Fm48pYWaQujiim dLsdxQ0vNUOunTxKmSEr9gJ0o0NL0XYCbLKU3AV2I7ckznr09qJ/3xJKozXgyoB6Gk25 vn1MlVEcgjn8f8Si8qJ1ioGLyIrav6X+gUCt8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wmlFp7IyZjhJM+UbKugZxR7EIWg6Bz16CqvqAdC73iw=; b=iHgKfLWEi+JJ1cMNV38+Yw6HS3bjJeDpU0pfYMbNmgNia045rVscLdWH8J5aoVOCQ1 ukCfFGRArP0gFFFh5L1UnkYZJZW/KMagTms8zDB8QcuAhlSFX67fc1D0e6IOdG6ESwLL uZJPQMwUx0bi7qSFxHiu5AziytTwZ5siI4f6J8zE67iFiIhfLbGXiB1xJ9nul2lQK7y8 R1EXDYncB+eCi820Z9iGElNgM9GKHUasO2YJq15BWvFg1OOGtUX3S3CLS/UDoX6i4Oty VC/K0MUyfDsYuIhm0Ve/ZmWqtwBEHRT7FpRsByBwKSrtWpgMIeoYAj95ggW8bwFvD/dM ITAw== X-Gm-Message-State: AOAM53191ttZLgdEkFGZwngBSxuVoqAnt00Uif6Cb91Xi/pmA57lcB1Q GwJtNhuPUc3sVnJCbTzF1343AvJ+MiBaKkfI X-Google-Smtp-Source: ABdhPJzJXNh3UQR+Uqp7ifUcGaA7sVFQkvY+IO8wS8xXV5Y/3TCRf83teF0uR/1G+AnmhHmv7fnphw== X-Received: by 2002:a2e:99da:: with SMTP id l26mr845867ljj.339.1630521202709; Wed, 01 Sep 2021 11:33:22 -0700 (PDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id h17sm47807ljg.131.2021.09.01.11.33.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 11:33:20 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id w4so576548ljh.13 for ; Wed, 01 Sep 2021 11:33:19 -0700 (PDT) X-Received: by 2002:a05:651c:908:: with SMTP id e8mr836025ljq.507.1630521198866; Wed, 01 Sep 2021 11:33:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Wed, 1 Sep 2021 11:33:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [git pull] drm for 5.15-rc1 To: Dave Airlie , John Clements , Hawking Zhang , Alex Deucher Cc: Daniel Vetter , dri-devel , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 1, 2021 at 10:57 AM Linus Torvalds wrote: > > No worries. I enjoyed seeing the AMD code-names in the conflicts, they > are using positively kernel-level naming. Oh, I spoke too soon. The conflict in amdgpu_ras_eeprom.c is trivial to fix up, but the *code* is garbage. It does this (from commit 14fb496a84f1: "drm/amdgpu: set RAS EEPROM address from VBIOS"): ... control->i2c_address = 0; if (amdgpu_atomfirmware_ras_rom_addr(adev, (uint8_t*)&control->i2c_address)) { if (control->i2c_address == 0xA0) control->i2c_address = 0; ... and honestly, that just hurts to look at. It's completely wrong, even if it happens to work on a little-endian machine. Yes, yes, BE is irrelevant, and doubly so for an AMD GPU driver, but still. It's assigning a 8-bit value to a 32-bit entity by doing a pointer cast on the address, and then mixing things up by using/assigning to that same field. That's just *wrong* and nasty. Oh, the resolution would be easy - just take that broken code as-is - but I can't actually make myself do that. So I fixed it up to not be that incredibly ugly garbage. Please holler if I did something wrong. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E1F7C432BE for ; Wed, 1 Sep 2021 18:33:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E013061058 for ; Wed, 1 Sep 2021 18:33:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E013061058 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CE446E255; Wed, 1 Sep 2021 18:33:24 +0000 (UTC) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04CA66E255 for ; Wed, 1 Sep 2021 18:33:22 +0000 (UTC) Received: by mail-lj1-x229.google.com with SMTP id s12so731218ljg.0 for ; Wed, 01 Sep 2021 11:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wmlFp7IyZjhJM+UbKugZxR7EIWg6Bz16CqvqAdC73iw=; b=aO3JVvdoC0SVDHw81BnqPRgF6kxIUydorxW6tTvTFB4MtXnxf1a0Fm48pYWaQujiim dLsdxQ0vNUOunTxKmSEr9gJ0o0NL0XYCbLKU3AV2I7ckznr09qJ/3xJKozXgyoB6Gk25 vn1MlVEcgjn8f8Si8qJ1ioGLyIrav6X+gUCt8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wmlFp7IyZjhJM+UbKugZxR7EIWg6Bz16CqvqAdC73iw=; b=T48Sx8akHeRK2ucESkcU9yzz4Wgww8kfuNMzu6bY4zr3Dbx86oPCklXUqvUDaI6jun 7+z9/bI8sgQc/XvXhgjADumA53Mx/Fc/y1FiyYdagbk3voHC19xCxBE6OQTlyVLlMF/0 f3H5oQKHZvogZnWm83JirTZN4doLz58aEoCZicuwgKvyMM3CdcixnQAVvHmH0OZfKsf0 xo+L7NqF6Mc0MBHZVUwG3ap09TQAO9jHAOckp89K3VY2QUHHWlMrrF9XhJGvywTcCAav MBHb+Ln9wYvnanvc1i9qzZt65+i+/dVJuQkjpHG9F0ah8iLP66hQXZENcFFLoUHSvXRu PXuw== X-Gm-Message-State: AOAM532FT2Cp+2eCChJkmdbvpFL5VsdVsxxszV+Os8RDWAdFs1jui0eS AJIiqLkK8EzLB9MPMdLpgq4WHPIrRwHADVAS X-Google-Smtp-Source: ABdhPJzwXbPxTw2ZIrmYm6PiH7s9+pT/PYtwKnJidH3Oi4k7fZkXeZr8cnUXyb8bPfIjJtxHoudD9w== X-Received: by 2002:a2e:b16a:: with SMTP id a10mr890786ljm.18.1630521200979; Wed, 01 Sep 2021 11:33:20 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id y2sm24922lfe.242.2021.09.01.11.33.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 11:33:19 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id g14so635067ljk.5 for ; Wed, 01 Sep 2021 11:33:19 -0700 (PDT) X-Received: by 2002:a05:651c:908:: with SMTP id e8mr836025ljq.507.1630521198866; Wed, 01 Sep 2021 11:33:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Wed, 1 Sep 2021 11:33:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [git pull] drm for 5.15-rc1 To: Dave Airlie , John Clements , Hawking Zhang , Alex Deucher Cc: Daniel Vetter , dri-devel , LKML Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Sep 1, 2021 at 10:57 AM Linus Torvalds wrote: > > No worries. I enjoyed seeing the AMD code-names in the conflicts, they > are using positively kernel-level naming. Oh, I spoke too soon. The conflict in amdgpu_ras_eeprom.c is trivial to fix up, but the *code* is garbage. It does this (from commit 14fb496a84f1: "drm/amdgpu: set RAS EEPROM address from VBIOS"): ... control->i2c_address = 0; if (amdgpu_atomfirmware_ras_rom_addr(adev, (uint8_t*)&control->i2c_address)) { if (control->i2c_address == 0xA0) control->i2c_address = 0; ... and honestly, that just hurts to look at. It's completely wrong, even if it happens to work on a little-endian machine. Yes, yes, BE is irrelevant, and doubly so for an AMD GPU driver, but still. It's assigning a 8-bit value to a 32-bit entity by doing a pointer cast on the address, and then mixing things up by using/assigning to that same field. That's just *wrong* and nasty. Oh, the resolution would be easy - just take that broken code as-is - but I can't actually make myself do that. So I fixed it up to not be that incredibly ugly garbage. Please holler if I did something wrong. Linus