All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Wang Ming <machel@vivo.com>,  Minjie Du <duminjie@vivo.com>,
	linux-wireless@vger.kernel.org,  dan.g.tob@gmail.com
Subject: Re: [PATCH] wifi: ath9k: Remove error checks when creating debugfs entries
Date: Tue, 06 Aug 2024 07:54:55 +0300	[thread overview]
Message-ID: <871q32jlnk.fsf@kernel.org> (raw)
In-Reply-To: <87ikwepwv1.fsf@toke.dk> ("Toke Høiland-Jørgensen"'s message of "Mon, 05 Aug 2024 21:56:18 +0200")

Toke Høiland-Jørgensen <toke@toke.dk> writes:

> Toke Høiland-Jørgensen <toke@toke.dk> writes:
>
>> From: Toke Høiland-Jørgensen <toke@redhat.com>
>>
>> We should not be checking the return values from debugfs creation at all: the
>> debugfs functions are designed to handle errors of previously called functions
>> and just transparently abort the creation of debugfs entries when debugfs is
>> disabled. If we check the return value and abort driver initialisation, we break
>> the driver if debugfs is disabled (such as when booting with debugfs=off).
>>
>> Earlier versions of ath9k accidentally did the right thing by checking the
>> return value, but only for NULL, not for IS_ERR(). This was "fixed" by the two
>> commits referenced below, breaking ath9k with debugfs=off starting from the 6.6
>> kernel (as reported in the Bugzilla linked below).
>>
>> Restore functionality by just getting rid of the return value check entirely.
>>
>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=219122
>> Fixes: 1e4134610d93 ("wifi: ath9k: use IS_ERR() with debugfs_create_dir()")
>> Fixes: 6edb4ba6fb5b ("wifi: ath9k: fix parameter check in ath9k_init_debug()")
>> Reported-by: dan.g.tob@gmail.com
>> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
>
>>From the bugzilla entry above:
>
> Tested-by: Daniel Tobias <dan.g.tob@gmail.com>
>
>
> Kalle, if you could also update the reported-by to include Daniel's full
> name when applying, that would be awesome :)

Will do.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2024-08-06  4:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 11:02 [PATCH] wifi: ath9k: Remove error checks when creating debugfs entries Toke Høiland-Jørgensen
2024-08-05 19:56 ` Toke Høiland-Jørgensen
2024-08-06  4:54   ` Kalle Valo [this message]
2024-08-07  8:09 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q32jlnk.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=dan.g.tob@gmail.com \
    --cc=duminjie@vivo.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=machel@vivo.com \
    --cc=toke@toke.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.