History log of /linux-master/drivers/staging/rts5208/rtsx.h
Revision Date Author Comments
# 84b52696 12-Oct-2023 Soumya Negi <soumya.negi97@gmail.com>

staging: rts5208: Remove macros scsi_lock(), scsi_unlock()

The scsi_lock() and scsi_unlock() macros protect the sm_state and the
single queue element srb for write access in the driver. As suggested,
these names are very generic. Remove the macros from header file and call
spin_lock_irq() & spin_unlock_irq() directly instead.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Soumya Negi <soumya.negi97@gmail.com>
Link: https://lore.kernel.org/r/75a5990190cf7a5d20d1c27237b90b583e68ced8.1697152251.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5b91f876 12-Oct-2023 Soumya Negi <soumya.negi97@gmail.com>

staging: rts5208: Refactor macros to static inline functions

Driver rts5208 uses macros to read/write data & to perform generic PCI
functions. Rewrite these macros as static inline functions in the header
file.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Soumya Negi <soumya.negi97@gmail.com>
Link: https://lore.kernel.org/r/c7431fe4d7f72138d8dc86269794f87c30d21a38.1697152251.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bb1e6779 22-Oct-2018 Kim Bradley <kim.jamie.bradley@gmail.com>

Staging: rts5208: Add SPDX license tags

Add SPDX license tags to remove checkpatch SPDX warnings.

Signed-off-by: Kim Bradley <kim.jamie.bradley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c238d7b1 18-Jun-2018 Arnd Bergmann <arnd@arndb.de>

staging: rtsx: remove rtsx_trace() and related code

The driver has rather excessive amount of tracing code, which would be
better done using ftrace. This is obviously not a main feature of the
driver, and it should work just as well without it.

Removing it saves over 1300 lines of code and likely makes the driver
a bit faster by avoiding lots of calls into the timekeeping code.

I came across this while cleaning up the last users of the deprecated
getnstimeofday64() function, of which there is one in the now-removed
get_current_time() function of the rtsx driver that was only used for
tracing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1c0c275b 27-Nov-2017 Sinan Kaya <okaya@codeaurora.org>

staging: rts5208: remove rtsx_read_pci_cfg_byte()

Remove unused rtsx_read_pci_cfg_byte() function.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3f19de36 11-Oct-2016 Wayne Porter <wporter82@gmail.com>

staging: rts5208: Add space around operator

Spaces are preferred around operators for readability

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 55e94ccb 23-Sep-2016 Sergio Paracuellos <sergio.paracuellos@gmail.com>

staging: rts5208: fix comment blocks style in rtsx.h

This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8e7e0a96 23-Sep-2016 Sergio Paracuellos <sergio.paracuellos@gmail.com>

staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t

This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: do not add new typedefs

It also remove DELAY_PARA_T because code is not using it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7c7f2361 20-Sep-2016 Rehas Sachdeva <aquannie@gmail.com>

staging: rts5208: Remove space after cast

Removes unnecessary space after a cast. Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bd778ef0 20-Sep-2016 Rehas Sachdeva <aquannie@gmail.com>

staging: rts5208: Fix indentation

Fixes indentation by removing unnecessary TAB. Issue found by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d5b7d2b0 30-Jul-2016 Jonas Rickert <jrickertkc@gmail.com>

Staging: rts5208: fix double blank line coding style issues

This is a patch for double blank lines and a missing blank line reported
by checkpatch.pl

Signed-off-by: Jonas Rickert <jrickertkc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6ed97742 05-Jun-2015 Yijing Wang <wangyijing@huawei.com>

staging: rts5208: Use common pci_get_bus_and_slot() instead of private one

We already have a inline pci_get_bus_and_slot() in include/linux/pci.h,
Use it instead of local one.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d5a7d45f 30-Apr-2015 Ksenija Stanojevic <ksenija.stanojevic@gmail.com>

Staging: rts5208: Replace timeval with timespec64

struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 031366ea 25-Mar-2015 Joe Perches <joe@perches.com>

staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros

Remove these flow hiding macros.

Miscellanea:

o Add a macro and function to replace a large inline
o Simplify #includes
o Add trace.c and update Makefile
o Remove static inline filename function and use kbasename instead

This reduces object size quite a lot: ~350KB (x86-64 allyesconfig)

$ size drivers/staging/rts5208/built-in.o*
text data bss dec hex filename
248385 36728 77888 363001 589f9 drivers/staging/rts5208/built-in.o.new
506691 83352 115896 705939 ac593 drivers/staging/rts5208/built-in.o.old

Done via coccinelle script and some typing.

@@
expression chip;
expression ret;
@@

- TRACE_RET(chip, ret);
+ rtsx_trace(chip);
+ return ret;

@@
expression chip;
identifier label;
@@

- TRACE_GOTO(chip, label);
+ rtsx_trace(chip);
+ goto label;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bf6c0d11 29-Jul-2014 Fabio Falzoi <fabio.falzoi84@gmail.com>

Staging: rts5208: Replace custom macro with dev_dbg

Use dev_dbg macro to control tracing verbosity through dynamic debug facility.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 885a947e 10-Dec-2013 Paul Gortmaker <paul.gortmaker@windriver.com>

staging: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fa590c22 12-Nov-2013 Micky Ching <micky_ching@realsil.com.cn>

staging: rts5208: add support for rts5208 and rts5288

There are still many rts5208/5288 card readers being used, but no
drivers are supported them in kernel now. This driver can make a
great convenience for people who use them.

Many other rts-series card reader are supported by mfd driver, but due
to much difference with others, rts5208/5288 can not add into mfd driver
pretty now, so we provide a separated driver here to support the device.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>