public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [jlayton:nfs-netdown 6/6] net/sunrpc/clnt.c:2074:18: error: must use 'struct' tag to refer to type 'rpc_task'
@ 2025-03-22  5:16 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-03-22  5:16 UTC (permalink / raw)
  To: Jeff Layton; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git nfs-netdown
head:   80864ce87d5678a278000ff4f0714dfc66f18ef9
commit: 80864ce87d5678a278000ff4f0714dfc66f18ef9 [6/6] sunrpc: shutdown the rpc_clnt on fatal ENETUNREACH
config: riscv-randconfig-002-20250322 (https://download.01.org/0day-ci/archive/20250322/202503221309.FHvt4qRk-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project c2692afc0a92cd5da140dfcdfff7818a5b8ce997)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250322/202503221309.FHvt4qRk-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503221309.FHvt4qRk-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/sunrpc/clnt.c:2074:18: error: must use 'struct' tag to refer to type 'rpc_task'
    2074 | netunreach_fatal(rpc_task *task)
         |                  ^
         |                  struct 
>> net/sunrpc/clnt.c:2134:7: error: call to undeclared function 'netunreach_fatak'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2134 |                 if (netunreach_fatak(task))
         |                     ^
   net/sunrpc/clnt.c:2134:7: note: did you mean 'netunreach_fatal'?
   net/sunrpc/clnt.c:2074:1: note: 'netunreach_fatal' declared here
    2074 | netunreach_fatal(rpc_task *task)
         | ^
   net/sunrpc/clnt.c:2226:7: error: call to undeclared function 'netunreach_fatak'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2226 |                 if (netunreach_fatak(task))
         |                     ^
   net/sunrpc/clnt.c:2493:7: error: call to undeclared function 'netunreach_fatak'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2493 |                 if (netunreach_fatak(task))
         |                     ^
   4 errors generated.


vim +2074 net/sunrpc/clnt.c

  2072	
  2073	static bool
> 2074	netunreach_fatal(rpc_task *task)
  2075	{
  2076		if (task->tk_flags & RPC_TASK_NETUNREACH_FATAL) {
  2077			rpc_clnt_shutdown(task->tk_client);
  2078			return true;
  2079		}
  2080		return false;
  2081	}
  2082	
  2083	/*
  2084	 * 4a.	Sort out bind result
  2085	 */
  2086	static void
  2087	call_bind_status(struct rpc_task *task)
  2088	{
  2089		struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt;
  2090		int status = -EIO;
  2091	
  2092		if (rpc_task_transmitted(task)) {
  2093			rpc_task_handle_transmitted(task);
  2094			return;
  2095		}
  2096	
  2097		if (task->tk_status >= 0)
  2098			goto out_next;
  2099		if (xprt_bound(xprt)) {
  2100			task->tk_status = 0;
  2101			goto out_next;
  2102		}
  2103	
  2104		switch (task->tk_status) {
  2105		case -ENOMEM:
  2106			rpc_delay(task, HZ >> 2);
  2107			goto retry_timeout;
  2108		case -EACCES:
  2109			trace_rpcb_prog_unavail_err(task);
  2110			/* fail immediately if this is an RPC ping */
  2111			if (task->tk_msg.rpc_proc->p_proc == 0) {
  2112				status = -EOPNOTSUPP;
  2113				break;
  2114			}
  2115			rpc_delay(task, 3*HZ);
  2116			goto retry_timeout;
  2117		case -ENOBUFS:
  2118			rpc_delay(task, HZ >> 2);
  2119			goto retry_timeout;
  2120		case -EAGAIN:
  2121			goto retry_timeout;
  2122		case -ETIMEDOUT:
  2123			trace_rpcb_timeout_err(task);
  2124			goto retry_timeout;
  2125		case -EPFNOSUPPORT:
  2126			/* server doesn't support any rpcbind version we know of */
  2127			trace_rpcb_bind_version_err(task);
  2128			break;
  2129		case -EPROTONOSUPPORT:
  2130			trace_rpcb_bind_version_err(task);
  2131			goto retry_timeout;
  2132		case -ENETDOWN:
  2133		case -ENETUNREACH:
> 2134			if (netunreach_fatak(task))
  2135				break;
  2136			fallthrough;
  2137		case -ECONNREFUSED:		/* connection problems */
  2138		case -ECONNRESET:
  2139		case -ECONNABORTED:
  2140		case -ENOTCONN:
  2141		case -EHOSTDOWN:
  2142		case -EHOSTUNREACH:
  2143		case -EPIPE:
  2144			trace_rpcb_unreachable_err(task);
  2145			if (!RPC_IS_SOFTCONN(task)) {
  2146				rpc_delay(task, 5*HZ);
  2147				goto retry_timeout;
  2148			}
  2149			status = task->tk_status;
  2150			break;
  2151		default:
  2152			trace_rpcb_unrecognized_err(task);
  2153		}
  2154	
  2155		rpc_call_rpcerror(task, status);
  2156		return;
  2157	out_next:
  2158		task->tk_action = call_connect;
  2159		return;
  2160	retry_timeout:
  2161		task->tk_status = 0;
  2162		task->tk_action = call_bind;
  2163		rpc_check_timeout(task);
  2164	}
  2165	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-22  5:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-22  5:16 [jlayton:nfs-netdown 6/6] net/sunrpc/clnt.c:2074:18: error: must use 'struct' tag to refer to type 'rpc_task' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox