Ohad Sharabi
a22f0ec073
habanalabs: refactor init device cpu code
...
Replace multiple arguments to init device CPU function by passing
firmware loader managing structure that is initialized per ASIC with
the loader parameters.
In addition, the FW loader management structure is now part of the
habanalabs device, this way the loader parameters will be able to be
communicated across various boot stages.
Signed-off-by: Ohad Sharabi <osharabi@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-06-18 15:23:38 +03:00
Ohad Sharabi
364690429a
habanalabs: request f/w in separate function
...
This refactor is needed due to the dynamic FW load in which requesting
the FW file (and getting its attributes) is not immediately followed by
copying FW file content.
Signed-off-by: Ohad Sharabi <osharabi@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-06-18 15:23:38 +03:00
Ohad Sharabi
6e16ab6c32
habanalabs: prepare preboot stage to dynamic f/w load
...
Start the skeleton for the dynamic F/W load by marking current preboot
code path as legacy.
Signed-off-by: Ohad Sharabi <osharabi@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-06-18 15:23:38 +03:00
Oded Gabbay
3b39840083
habanalabs: update firmware files to latest
...
Update the firmware files to the latest from the firmware team.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-06-18 15:23:38 +03:00
Moti Haimovski
7bd1e23e5f
habanalabs: increase ELBI reset timeout for PLDM
...
On PLDM, in case of NIC hangs, the ELBI reset to take much longer than
expected. As a result an increase in the ELBI reset timeout is required.
Signed-off-by: Moti Haimovski <mhaimovski@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-06-18 15:23:38 +03:00
Tom Rix
c7e9967668
mei: hdcp: SPDX tag should be the first line
...
checkpatch looks for the tag on the first line.
So delete empty first line
Signed-off-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20210610214438.3161140-4-trix@redhat.com
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-15 17:12:58 +02:00
Daniel Kiss
b27a9f4119
arm64: Add ARM64_PTR_AUTH_KERNEL config option
...
This patch add the ARM64_PTR_AUTH_KERNEL config and deals with the
build aspect of it.
Userspace support has no dependency on the toolchain therefore all
toolchain checks and build flags are controlled the new config
option.
The default config behavior will not be changed.
Signed-off-by: Daniel Kiss <daniel.kiss@arm.com >
Acked-by: Will Deacon <will@kernel.org >
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com >
Link: https://lore.kernel.org/r/20210613092632.93591-2-daniel.kiss@arm.com
Signed-off-by: Will Deacon <will@kernel.org >
2021-06-15 11:32:31 +01:00
Greg Kroah-Hartman
99289bf1a7
Merge tag 'v5.13-rc6' into tty-next
...
We want the tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-14 09:14:43 +02:00
Greg Kroah-Hartman
68afbd8459
Merge tag 'v5.13-rc6' into driver-core-next
...
We need the driver core fix in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-14 09:07:45 +02:00
Greg Kroah-Hartman
db4e54aefd
Merge tag 'v5.13-rc6' into char-misc-next
...
We need the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-14 08:59:06 +02:00
Jiri Prchal
eab61fb1cc
nvmem: eeprom: at25: fram discovery simplification
...
Changed "is_fram" to bool and set it based on compatible string.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz >
Link: https://lore.kernel.org/r/20210611152416.68386-1-jiri.prchal@aksignal.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-12 15:34:17 +02:00
Jiri Prchal
604288bc61
nvmem: eeprom: at25: fix type compiler warnings
...
Fixes:
drivers/misc/eeprom/at25.c:181:28: warning: field width should have type 'int', but argument has type 'unsigned long'
drivers/misc/eeprom/at25.c:386:13: warning: cast to smaller integer type 'int' from 'const void *'
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz >
Fixes: fd307a4ad3 ("nvmem: prepare basics for FRAM support")
Link: https://lore.kernel.org/r/20210611142706.27336-1-jiri.prchal@aksignal.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-11 16:42:41 +02:00
Jiri Prchal
fd307a4ad3
nvmem: prepare basics for FRAM support
...
Added enum and string for FRAM (ferroelectric RAM) to expose it as file
named "fram".
Added documentation of sysfs file.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz >
Link: https://lore.kernel.org/r/20210611094601.95131-2-jiri.prchal@aksignal.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-11 12:23:10 +02:00
Ricky Wu
3df4fce739
misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG
...
aspm (Active State Power Management)
rtsx_comm_set_aspm: this function is for driver to make sure
not enter power saving when processing of init and card_detcct
ASPM_MODE_CFG: 8411 5209 5227 5229 5249 5250
Change back to use original way to control aspm
ASPM_MODE_REG: 5227A 524A 5250A 5260 5261 5228
Keep the new way to control aspm
Fixes: 121e9c6b5c ("misc: rtsx: modify and fix init_hw function")
Reported-by: Chris Chiu <chris.chiu@canonical.com >
Tested-by: Gordon Lack <gordon.lack@dsl.pipex.com >
Cc: stable <stable@vger.kernel.org >
Signed-off-by: Ricky Wu <ricky_wu@realtek.com >
Link: https://lore.kernel.org/r/20210607101634.4948-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 19:10:22 +02:00
Kai Ye
762b296bcb
uacce: add print information if not enable sva
...
Add print information necessary if user not enable sva.
Signed-off-by: Kai Ye <yekai13@huawei.com >
Link: https://lore.kernel.org/r/1623233345-8765-1-git-send-email-yekai13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 18:53:29 +02:00
Andy Shevchenko
7504112065
eeprom: idt_89hpesx: use SPDX-License-Identifier
...
Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20210607221757.81465-3-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 18:39:40 +02:00
Andy Shevchenko
e0db3deea7
eeprom: idt_89hpesx: Restore printing the unsupported fwnode name
...
When iterating over child firmware nodes restore printing the name of ones
that are not supported.
While at it, refactor loop body to clearly show that we stop at the first match.
Fixes: db15d73e5f ("eeprom: idt_89hpesx: Support both ACPI and OF probing")
Cc: Huy Duong <qhuyduong@hotmail.com >
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20210607221757.81465-2-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 18:39:40 +02:00
Andy Shevchenko
3f6ee1c095
eeprom: idt_89hpesx: Put fwnode in matching case during ->probe()
...
device_get_next_child_node() bumps a reference counting of a returned variable.
We have to balance it whenever we return to the caller.
Fixes: db15d73e5f ("eeprom: idt_89hpesx: Support both ACPI and OF probing")
Cc: Huy Duong <qhuyduong@hotmail.com >
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20210607221757.81465-1-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 18:39:40 +02:00
Baokun Li
20827dddf2
misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c
...
Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c.
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Baokun Li <libaokun1@huawei.com >
Link: https://lore.kernel.org/r/20210609071430.1337400-1-libaokun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 14:52:16 +02:00
Colin Ian King
432b6c5607
habanalabs/gaudi: remove redundant assignment to variable err
...
The variable err is being assigned a value that is never read, the
assignment is redundant and can be removed. Also remove some empty
lines.
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Addresses-Coverity: ("Unused value")
Link: https://lore.kernel.org/r/20210603131210.84763-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 14:51:53 +02:00
Christophe JAILLET
d208cbb002
misc/pvpanic: Remove some dead-code
...
'pvpanic_remove()' is referenced only by a 'devm_add_action_or_reset()'
call in 'devm_pvpanic_probe()'. So, we know that its parameter is non-NULL.
Axe the unneeded check to save a few lines of code.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/8e425618f4042a8ab8366be4d34026972e77bd40.1622911768.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-09 14:45:33 +02:00
Heiner Kallweit
2fa7d74ff5
eeprom: ee1004: Remove not needed debug message
...
If a user is interested in such transfer statistics he can simply
switch on smbus tracing.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/6169f52e-6ede-d7cc-7f8b-cced55b693d0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-04 15:28:27 +02:00
Matt Hsiao
23d51b8181
misc: hpilo: map iLO shared memory by PCI revision id
...
Starting from iLO ASIC 'Neches' with subsystem device id 0x00E4,
bar 5 is used for shared memory region mapping instead of bar 2
because bar 2 is made inaccessible after system POST for security
reason.
As this holds true for future iLO ASIC generations, it does not
make sense to map shared memory region according to the subsystem
device id of each following generations.
Map iLO shared memory region with PCI revision id that maps to the
iLO ASIC generation, starting from Neches (Rev 7).
Signed-off-by: Matt Hsiao <matt.hsiao@hpe.com >
Link: https://lore.kernel.org/r/20210531085551.26421-1-matt.hsiao@hpe.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-06-04 15:28:23 +02:00
Greg Kroah-Hartman
910cc95373
Merge 5.13-rc4 into tty-next
...
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-31 09:44:28 +02:00
Greg Kroah-Hartman
92722bac5f
Merge 5.13-rc4 into driver-core-next
...
We need the driver core fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-31 09:10:03 +02:00
Greg Kroah-Hartman
2d06954e23
Merge 5.13-rc4 into char-misc-next
...
We need the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-31 09:03:10 +02:00
Linus Torvalds
f956cb99b9
Merge tag 'char-misc-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
...
Pull char/misc driver fixes from Greg KH:
"Here are some tiny char/misc driver fixes for 5.13-rc4.
Nothing huge here, just some tiny fixes for reported issues:
- two interconnect driver fixes
- kgdb build warning fix for gcc-11
- hgafb regression fix
- soundwire driver fix
- mei driver fix
All have been in linux-next with no reported issues"
* tag 'char-misc-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
mei: request autosuspend after sending rx flow control
kgdb: fix gcc-11 warnings harder
video: hgafb: correctly handle card detect failure during probe
soundwire: qcom: fix handling of qcom,ports-block-pack-mode
interconnect: qcom: Add missing MODULE_DEVICE_TABLE
interconnect: qcom: bcm-voter: add a missing of_node_put()
2021-05-29 06:41:50 -10:00
Uwe Kleine-König
39b27e89a7
driver core: Drop helper devm_platform_ioremap_resource_wc()
...
Since the macro was introduced in 2019 (commit bb6243b4f7 ("drivers:
platform: provide devm_platform_ioremap_resource_wc()") there is only a
single user which hardly justifies the function for the small task it
provides.
So drop the helper and open-code it in the only user. Adapt the non-wc
case accordingly.
For a all-mod-config build on amd64 this change introduces the following
changes according to bloat-o-meter:
add/remove: 0/1 grow/shrink: 1/0 up/down: 20/-252 (-232)
Function old new delta
devm_platform_ioremap_resource_wc 252 - -252
sram_probe 796 816 +20
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20210525103711.956438-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 15:51:33 +02:00
Alexander Usyskin
bbf0a94744
mei: request autosuspend after sending rx flow control
...
A rx flow control waiting in the control queue may block autosuspend.
Re-request autosuspend after flow control been sent to unblock
the transition to the low power state.
Cc: <stable@vger.kernel.org >
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20210526193334.445759-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 15:17:19 +02:00
Heiner Kallweit
5fe3cba0bf
eeprom: ee1004: Add helper ee1004_cleanup
...
Factor out the cleanup code to a new helper ee1004_cleanup().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/9738cbc7-458d-276f-4012-66551f105d90@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:40 +02:00
Heiner Kallweit
8700a7328e
eeprom: ee1004: Add constant EE1004_NUM_PAGES
...
Add a constant for the number of pages.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/6167f9c5-995a-03c3-c324-e93e2a6c969b@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:40 +02:00
Heiner Kallweit
8aeacb7a2d
eeprom: ee1004: Move call to ee1004_set_current_page to ee1004_eeprom_read
...
Moving the call to ee1004_set_current_page() to ee1004_eeprom_read()
allows to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/2829a131-51e3-8865-462a-564080158b0b@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
6f68dbd6cc
eeprom: ee1004: Improve error handling in ee1004_read
...
Simplify the error handling and make it better readable. No functional
change intended.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/13ad7b39-e722-d70a-e25b-03d1fb1734a7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
6601017e2a
eeprom: ee1004: Factor out setting page to ee1004_set_current_page
...
Factor out setting the page, this makes the code better readable.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/21e0966f-e6c9-045f-b130-bd9fb071f0d7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
b2cd8a2f8e
eeprom: ee1004: Cache current page at initialization of first device only
...
The value of ee1004_current_page applies to all SPD eeproms connected
to the adapter. Therefore it's sufficient if we set ee1004_current_page
when the first device is added.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/b9240e58-08bb-3d71-7a9c-9a323b470ab6@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
2ac99039c5
eeprom: ee1004: Switch to i2c probe_new callback
...
Switch to the new i2c_driver probe callback version.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/eb5be659-7427-46c5-66c2-b39650e08ea3@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
3c03dad765
eeprom: ee1004: Improve creating dummy devices
...
i2c_new_dummy_device() calls i2c_new_client_device() that complains
if it fails to create the device. Therefore we don't have to emit an
error message in case of failure. In addition ensure that
ee1004_set_page is only set if creating the device succeeded.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/d38df5ac-6ecb-7d5f-b5c3-39bfc6a1e8a1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
08e5138aa4
eeprom: ee1004: Improve check for SMBUS features
...
We have to read 512 bytes only, therefore read performance isn't really
a concern. Don't bother the user if i2c block read isn't supported.
For i2c_smbus_read_i2c_block_data_or_emulated() to work it's sufficient
if I2C_FUNC_SMBUS_READ_I2C_BLOCK or I2C_FUNC_SMBUS_READ_BYTE_DATA is
supported. Therefore remove the check for I2C_FUNC_SMBUS_READ_WORD_DATA.
In addition check for I2C_FUNC_SMBUS_WRITE_BYTE (included in
I2C_FUNC_SMBUS_BYTE) which is needed for setting the page.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/840c668e-6310-e933-e50e-5abeaecfb39c@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
b97ba92e29
eeprom: ee1004: Remove usage of i2c_adapter_id in adapter comparison
...
We can compare the adapter pointers directly instead of using
i2c_adapter_id().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/99a3f94d-e7ca-e01d-6a78-81e109fde086@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
64bf274711
eeprom: ee1004: Remove not needed check in ee1004_eeprom_read
...
i2c_smbus_read_i2c_block_data_or_emulated() checks its length argument,
so we don't have to do it. In addition remove the unlikely hint from
the checks, we do i2c reads and therefore are in a slow path.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/eb2a8bff-43ec-c763-a417-9d741e6f0034@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
7abdadfcf1
eeprom: ee1004: Remove not needed check in ee1004_read
...
sysfs_kf_bin_read() checks this for us already. In addition
the function works correctly also w/o this check.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/33889bff-3614-4b73-5010-701635e1edab@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Heiner Kallweit
7adbd54fb2
eeprom: ee1004: Use kobj_to_i2c_client to simplify the code
...
Switch to helper kobj_to_i2c_client() to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/4ae57f09-b803-6ae3-c734-87e733a56eb8@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:49:39 +02:00
Christophe JAILLET
394febc9d0
misc/pvpanic: Make 'pvpanic_probe()' resource managed
...
Simplify code and turn 'pvpanic_probe()' into a managed resource version.
This simplify callers that don't need to do some clean-up on error in the
probe and on remove.
Update pvpanic-mmio.c and pvpanic-pci.c accordingly.
'pvpanic_remove()' don't need to be exported anymore.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/9212cdc8c1e5c187a2f1129a6190085c2a10d28a.1621665058.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:46:57 +02:00
Christophe JAILLET
a224db273a
misc/pvpanic-mmio: Use GFP_KERNEL instead of GFP_ATOMIC
...
There is no need to use GFP_ATOMIC in a probe function. Use GFP_KERNEL
instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/58cc7f12535a796a0ef1a699bcba61e45ab8a2ad.1621665058.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:46:57 +02:00
Christophe JAILLET
9a3c72ee6f
misc/pvpanic-mmio: Fix error handling in 'pvpanic_mmio_probe()'
...
There is no error handling path in the probe function.
Switch to managed resource so that errors in the probe are handled easily
and simplify the remove function accordingly.
Fixes: b3c0f87746 ("misc/pvpanic: probe multiple instances")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/2a5dab18f10db783b27e0579ba66cc38d610734a.1621665058.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:46:57 +02:00
Christophe JAILLET
b647ceb5a1
misc/pvpanic-pci: Use GFP_KERNEL instead of GFP_ATOMIC
...
There is no need to use GFP_ATOMIC in a probe function. Use GFP_KERNEL
instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/5ea4fb9802f7b780cc3e5ae768561a0372a39ebb.1621665058.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:46:57 +02:00
Christophe JAILLET
372dae8997
misc/pvpanic-pci: Fix error handling in 'pvpanic_pci_probe()'
...
There is no error handling path in the probe function.
Switch to managed resource so that errors in the probe are handled easily
and simplify the remove function accordingly.
Fixes: db3a4f0abe ("misc/pvpanic: add PCI driver")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/ab071b1f4ed6e1174f9199095fb16a58bb406090.1621665058.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 14:46:57 +02:00
Tong Zhang
281e468446
misc: alcor_pci: fix inverted branch condition
...
This patch fixes a trivial mistake that I made in the previous attempt
in fixing the null bridge issue. The branch condition is inverted and we
should call alcor_pci_find_cap_offset() only if bridge is not null.
Reported-by: Colin Ian King <colin.king@canonical.com >
Fixes: 3ce3e45cc3 ("misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge")
Signed-off-by: Tong Zhang <ztong0001@gmail.com >
Link: https://lore.kernel.org/r/20210522043725.602179-1-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-22 10:34:48 +02:00
Guenter Roeck
78429edfee
misc: xilinx-sdfec: Drop unnecessary NULL check after container_of
...
container_of() only returns NULL if the passed pointer is NULL _and_ if
the embedded element is the first element of the structure. Even if that
is the case, testing against it is misleading and possibly dangerous
because the position of the embedded element may change. In this case,
the check is unnecessary since it is known that file->private_data is
never NULL for an open file, and container_of() will therefore also
never be NULL. Drop the check.
Acked-by: Dragan Cvetic <dragan.cvetic@xilinx.com >
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210521200457.2112041-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-21 22:14:48 +02:00
Heiner Kallweit
b63866efa1
eeprom: ee1004: Let device core handle attribute eeprom
...
Instead of creating/removing the attribute ourselves, just declare the
attribute and let the device core handle it. This allows to simplify
the code.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Link: https://lore.kernel.org/r/8a6c77f2-f84a-311b-c2b9-21798f690e4d@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-21 22:13:13 +02:00