Re: [GIT PULL] Staging / IIO driver changes for 5.15-rc1

From: Linus Torvalds
Date: Wed Sep 01 2021 - 12:50:11 EST


On Wed, Sep 1, 2021 at 7:17 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Lots of churn in some staging drivers, we dropped the "old" rtl8188eu
> driver and replaced it with a newer version of the driver that had been
> maintained out-of-tree by Larry with the end goal of actually being able
> to get this driver out of staging eventually. Despite that driver being
> "newer" the line count of this pull request is going up.

Ugh.

So this had a conflict with the networking tree, and commit
89939e890605 ("staging: rtlwifi: use siocdevprivate") in particular.

Ok, so that conflict looked annoying but harmless - git saw the new
driver as a rename of the old one, and tried to actually apply the
changes from that commit to the new one.

And git actually did a reasonable job, everything considered. There
were enough similarities that it wasn't entirely crazy, and enough
differences that it caused conflicts.

HOWEVER.

Actually then looking at the root causes of the conflicts, as part of
just trying to finish what git had started, I notice that a lot of the
code in the new driver was just completely dead.

As of commit ae7471cae00a ("staging: r8188eu: remove rtw_ioctl
function") the only caller of rtw_android_priv_cmd() is entirely gone.

But rtw_android_priv_cmd() was kept around, and was in fact the only
reason that the files

drivers/staging/r8188eu/include/rtw_android.h
drivers/staging/r8188eu/os_dep/rtw_android.c

existed at all.

End result: instead of trying to fix up the conflict in dead code, I
just ripped out the code completely.

So my merge actually looks simple and clean: when you look at the
conflict diff of my merge, all you see is that I removed
'os_dep/rtw_android.o' from drivers/staging/r8188eu/Makefile.

What you don't actually see as a conflict, is that I removed those
files entirely. That removal doesn't show up as "conflicts", because
that filename didn't exist in my HEAD commit before the merge at all
(because my tree had that old "rtl8188eu" driver).

So this email is just a long explanation for what I did, to make
people aware that maybe I screwed up. It builds for me, and honestly,
it makes sense to me in ways that your git tree did not, but I can't
test any of it.

Added Arnd (for the siocdevprivate conversion) and Phillip/Larry (for
the r8188eu driver side) - can you please double-check what I did.

Linus