* [PATCH -next] cifs: use PTR_ERR_OR_ZERO() to simplify code
@ 2020-01-22 10:20 Chen Zhou
2020-01-22 16:55 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Chen Zhou @ 2020-01-22 10:20 UTC (permalink / raw)
To: sfrench; +Cc: linux-cifs, samba-technical, linux-kernel, chenzhou10
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR, just use
PTR_ERR_OR_ZERO directly.
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
fs/cifs/dfs_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 751c2fc..43c1b43 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -662,7 +662,7 @@ static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
*/
if (noreq) {
up_read(&htable_rw_lock);
- return IS_ERR(ce) ? PTR_ERR(ce) : 0;
+ return PTR_ERR_OR_ZERO(ce);
}
if (!IS_ERR(ce)) {
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] cifs: use PTR_ERR_OR_ZERO() to simplify code
2020-01-22 10:20 [PATCH -next] cifs: use PTR_ERR_OR_ZERO() to simplify code Chen Zhou
@ 2020-01-22 16:55 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2020-01-22 16:55 UTC (permalink / raw)
To: Chen Zhou; +Cc: Steve French, CIFS, samba-technical, LKML
merged into cifs-2.6.git for-next
On Wed, Jan 22, 2020 at 4:25 AM Chen Zhou <chenzhou10@huawei.com> wrote:
>
> PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR, just use
> PTR_ERR_OR_ZERO directly.
>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
> ---
> fs/cifs/dfs_cache.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
> index 751c2fc..43c1b43 100644
> --- a/fs/cifs/dfs_cache.c
> +++ b/fs/cifs/dfs_cache.c
> @@ -662,7 +662,7 @@ static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
> */
> if (noreq) {
> up_read(&htable_rw_lock);
> - return IS_ERR(ce) ? PTR_ERR(ce) : 0;
> + return PTR_ERR_OR_ZERO(ce);
> }
>
> if (!IS_ERR(ce)) {
> --
> 2.7.4
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-22 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 10:20 [PATCH -next] cifs: use PTR_ERR_OR_ZERO() to simplify code Chen Zhou
2020-01-22 16:55 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).