From: Ping-Ke Shih <pkshih@realtek.com>
To: Kees Bakker <kees@ijzerbout.nl>,
Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH v4 3/7] wifi: rtw88: Add rtw88xxa.{c,h}
Date: Wed, 13 Nov 2024 01:14:44 +0000 [thread overview]
Message-ID: <c368f9060bae4da78acdff6657a26a7d@realtek.com> (raw)
In-Reply-To: <9f95ac78-ed69-4554-825e-3ad294f49057@ijzerbout.nl>
> > +static void rtw88xxau_init_queue_reserved_page(struct rtw_dev *rtwdev)
> > +{
> > + const struct rtw_chip_info *chip = rtwdev->chip;
> > + struct rtw_fifo_conf *fifo = &rtwdev->fifo;
> > + const struct rtw_page_table *pg_tbl = NULL;
> > + u16 pubq_num;
> > + u32 val32;
> > +
> > + switch (rtw_hci_type(rtwdev)) {
> > + case RTW_HCI_TYPE_PCIE:
> > + pg_tbl = &chip->page_table[1];
> > + break;
> > + case RTW_HCI_TYPE_USB:
> > + if (rtwdev->hci.bulkout_num == 2)
> > + pg_tbl = &chip->page_table[2];
> > + else if (rtwdev->hci.bulkout_num == 3)
> > + pg_tbl = &chip->page_table[3];
> > + else if (rtwdev->hci.bulkout_num == 4)
> > + pg_tbl = &chip->page_table[4];
> > + break;
> > + case RTW_HCI_TYPE_SDIO:
> > + pg_tbl = &chip->page_table[0];
> > + break;
> > + default:
> All other switch (rtw_hci_type(rtwdev)) in this module handle
> the default with an error. Shouldn't you be doing that here too?
> In the default case the code continues with pg_tbl == NULL
> and thus it will crash.
Actually three supported HCI types are listed, so it will never fall into
the default case, which I think this is just to avoid static checkers complain.
However, 'return' would be more suitable than 'break' for default case.
> + break;
> + }
next prev parent reply other threads:[~2024-11-13 1:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 18:23 [PATCH v4 0/7] wifi: rtw88: Add support for RTL8821AU and RTL8812AU Bitterblue Smith
2024-10-30 18:24 ` [PATCH v4 1/7] wifi: rtw88: Add rtw8812a_table.{c,h} Bitterblue Smith
2024-11-06 6:32 ` Ping-Ke Shih
2024-10-30 18:25 ` [PATCH v4 2/7] wifi: rtw88: Add rtw8821a_table.{c,h} Bitterblue Smith
2024-10-30 18:27 ` [PATCH v4 3/7] wifi: rtw88: Add rtw88xxa.{c,h} Bitterblue Smith
2024-11-12 20:04 ` Kees Bakker
2024-11-13 1:14 ` Ping-Ke Shih [this message]
2024-11-13 23:53 ` Bitterblue Smith
2024-10-30 18:28 ` [PATCH v4 4/7] wifi: rtw88: Add rtw8821a.{c,h} Bitterblue Smith
2024-11-12 20:29 ` Kees Bakker
2024-11-13 23:53 ` Bitterblue Smith
2024-10-30 18:28 ` [PATCH v4 5/7] wifi: rtw88: Add rtw8812a.{c,h} Bitterblue Smith
2024-10-30 18:29 ` [PATCH v4 6/7] wifi: rtw88: Add rtw8821au.c and rtw8812au.c Bitterblue Smith
2024-10-30 18:31 ` [PATCH v4 7/7] wifi: rtw88: Enable the new RTL8821AU/RTL8812AU drivers Bitterblue Smith
2024-11-01 0:35 ` kernel test robot
2024-11-01 12:14 ` Bitterblue Smith
2024-11-01 0:56 ` kernel test robot
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=c368f9060bae4da78acdff6657a26a7d@realtek.com \
--to=pkshih@realtek.com \
--cc=kees@ijzerbout.nl \
--cc=linux-wireless@vger.kernel.org \
--cc=rtl8821cerfe2@gmail.com \
/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.